Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 5e7ce03dc5feb90ffcefde7489844d8d74086310
      
https://github.com/WebKit/WebKit/commit/5e7ce03dc5feb90ffcefde7489844d8d74086310
  Author: Nikolas Zimmermann <[email protected]>
  Date:   2024-06-20 (Thu, 20 Jun 2024)

  Changed paths:
    M Source/WebKit/PlatformWPE.cmake
    M Source/WebKit/UIProcess/API/wpe/qt6/WPEQtView.cpp
    M Source/WebKit/UIProcess/API/wpe/qt6/WPEQtView.h
    M Source/WebKit/UIProcess/API/wpe/qt6/WPEQtViewLoadRequest.cpp
    M Source/WebKit/UIProcess/API/wpe/qt6/WPEQtViewLoadRequest.h
    M Source/WebKit/UIProcess/API/wpe/qt6/WPEQtViewLoadRequestPrivate.h
    A Source/WebKit/UIProcess/API/wpe/qt6/WPEQtViewPrivate.h
    M Tools/Scripts/webkitpy/style/checker.py

  Log Message:
  -----------
  [WPE][Qt6] Make WPE/Qt public API usable
https://bugs.webkit.org/show_bug.cgi?id=275475

Reviewed by Michael Catanzaro and Adrian Perez de Castro.

- Introduce WPEQtViewPrivate, similar to WPEQtViewLoadRequestPrivate.
  Move all members from WPEQtView to WPEQtViewPrivate and make use of
  Qts d-ptr mechanism, to provide a stable ABI. This allows us to
  continue using GRefPtr to manage the web view lifetime -- prior to
  this patch it was impossible to include WPEQtView.h in projects using
  WPE/Qt6, since the WTF headers are not installed along libqtwpe.so.

- Provide non-inline virtual destructors for WPEQtView &
  WPEQtViewLoadRequest

- Assure all constructors are non-inline, for public API classes.

- Reimplement event() in QObject-derived classes, such as WPEQtView &
  WPEQtViewLoadRequest - folllowing the KDE ABI guidelines.

- Correct d-ptr usage in WPEQtViewLoadRequest. Previously one had to
  create WPEQtViewLoadRequestPrivate objects and pass them to
  WPEQtViewLoadRequest - which defeats the purpose of the d-ptr
  mechanism. No external class (except those inheriting from
  WPEQtViewLoadRequest, which we don't have) should need to construct
  d-ptr objects, since it's a private implementatil detail.

- Do not mark WPEQtView & friends with Q_DECL_EXPORT, but instead follow
  the Qt recommendation, of introducing a QT_WPE_EXPORT definition, that
  either resolves to Q_DECL_EXPORT or Q_DECL_IMPORT, depending on if we
  are building libqtwpe.so, or if we're using it externally.

  #if defined(QT_WPE_LIBRARY)
  #define QT_WPE_EXPORT Q_DECL_EXPORT
  #else
  #define QT_WPE_EXPORT Q_DECL_IMPORT
  #endif

Tested successfully on both desktop + yocto builds.

* Source/WebKit/PlatformWPE.cmake:
* Source/WebKit/UIProcess/API/wpe/qt6/WPEQtView.cpp:
(WPEQtView::WPEQtView):
(WPEQtView::~WPEQtView):
(WPEQtView::event):
(WPEQtView::geometryChange):
(WPEQtView::createWebView):
(WPEQtView::notifyLoadChangedCallback):
(WPEQtView::notifyLoadFailedCallback):
(WPEQtView::didUpdateScene):
(WPEQtView::updatePaintNode):
(WPEQtView::url const):
(WPEQtView::setUrl):
(WPEQtView::loadProgress const):
(WPEQtView::title const):
(WPEQtView::canGoBack const):
(WPEQtView::isLoading const):
(WPEQtView::canGoForward const):
(WPEQtView::goBack):
(WPEQtView::goForward):
(WPEQtView::reload):
(WPEQtView::stop):
(WPEQtView::loadHtml):
(WPEQtView::runJavaScript):
(WPEQtView::mousePressEvent):
(WPEQtView::mouseMoveEvent):
(WPEQtView::mouseReleaseEvent):
(WPEQtView::hoverEnterEvent):
(WPEQtView::hoverLeaveEvent):
(WPEQtView::hoverMoveEvent):
(WPEQtView::wheelEvent):
(WPEQtView::keyPressEvent):
(WPEQtView::keyReleaseEvent):
(WPEQtView::touchEvent):
(WPEQtView::webView const):
(WPEQtView::errorOccured const):
(WPEQtView::setErrorOccured):
* Source/WebKit/UIProcess/API/wpe/qt6/WPEQtView.h:
* Source/WebKit/UIProcess/API/wpe/qt6/WPEQtViewLoadRequest.cpp:
(WPEQtViewLoadRequest::WPEQtViewLoadRequest):
(WPEQtViewLoadRequest::~WPEQtViewLoadRequest):
(WPEQtViewLoadRequest::event):
* Source/WebKit/UIProcess/API/wpe/qt6/WPEQtViewLoadRequest.h:
* Source/WebKit/UIProcess/API/wpe/qt6/WPEQtViewLoadRequestPrivate.h:
(WPEQtViewLoadRequestPrivate::WPEQtViewLoadRequestPrivate):
(WPEQtViewLoadRequestPrivate::~WPEQtViewLoadRequestPrivate):
* Source/WebKit/UIProcess/API/wpe/qt6/WPEQtViewPrivate.h: Copied from 
Source/WebKit/UIProcess/API/wpe/qt6/WPEQtViewLoadRequestPrivate.h.
(WPEQtViewPrivate::WPEQtViewPrivate):
(WPEQtViewPrivate::~WPEQtViewPrivate):
* Tools/Scripts/webkitpy/style/checker.py:

Canonical link: https://commits.webkit.org/280220@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to