Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[WPE] Upstream the new WPE platform API
https://bugs.webkit.org/show_bug.cgi?id=265286 Reviewed by Adrian Perez de Castro and Michael Catanzaro. New WPE platform API is still work in progress, but we have enough already to know that this is the way we want to go, so we can continue working upstream. The new API is always built, but the old one will be used by default, so there shouldn't be any change in behavior. MiniBrowser and WKTR can use the new api by using a new command line option to enable it. * Source/WebCore/PlatformWPE.cmake: * Source/WebCore/SourcesWPE.txt: * Source/WebCore/platform/Scrollbar.cpp: (WebCore::Scrollbar::pixelsPerLineStep): * Source/WebCore/platform/graphics/PlatformDisplay.cpp: (WebCore::PlatformDisplay::createPlatformDisplay): * Source/WebCore/platform/graphics/PlatformDisplay.h: (WebCore::PlatformDisplay::setUseDMABufForRendering): * Source/WebCore/platform/libwpe/PlatformKeyboardEventLibWPE.cpp: (WebCore::PlatformKeyboardEvent::currentStateOfModifierKeys): * Source/WebKit/PlatformWPE.cmake: * Source/WebKit/Shared/NativeWebKeyboardEvent.h: * Source/WebKit/Shared/NativeWebMouseEvent.h: * Source/WebKit/Shared/NativeWebTouchEvent.h: * Source/WebKit/Shared/NativeWebWheelEvent.h: * Source/WebKit/Shared/WebKeyboardEvent.h: * Source/WebKit/Shared/WebPageCreationParameters.h: * Source/WebKit/Shared/WebPageCreationParameters.serialization.in: * Source/WebKit/Shared/WebProcessCreationParameters.h: * Source/WebKit/Shared/WebProcessCreationParameters.serialization.in: * Source/WebKit/Shared/libwpe/WebEventFactory.h: * Source/WebKit/Shared/wpe/GRefPtrWPE.cpp: Copied from Source/WebKit/UIProcess/API/C/wpe/WKView.h. (WTF::refGPtr): (WTF::derefGPtr): * Source/WebKit/Shared/wpe/GRefPtrWPE.h: Copied from Source/WebKit/UIProcess/API/C/wpe/WKView.h. * Source/WebKit/Shared/wpe/NativeWebKeyboardEventWPE.cpp: Copied from Source/WebKit/UIProcess/API/C/wpe/WKView.h. (WebKit::NativeWebKeyboardEvent::NativeWebKeyboardEvent): * Source/WebKit/Shared/wpe/NativeWebMouseEventWPE.cpp: Copied from Source/WebKit/UIProcess/API/C/wpe/WKView.h. (WebKit::NativeWebMouseEvent::NativeWebMouseEvent): * Source/WebKit/Shared/wpe/NativeWebTouchEventWPE.cpp: Copied from Source/WebKit/UIProcess/API/C/wpe/WKView.h. (WebKit::NativeWebTouchEvent::NativeWebTouchEvent): * Source/WebKit/Shared/wpe/NativeWebWheelEventWPE.cpp: Copied from Source/WebKit/UIProcess/API/C/wpe/WKView.h. (WebKit::NativeWebWheelEvent::NativeWebWheelEvent): * Source/WebKit/Shared/wpe/WebEventFactoryWPE.cpp: Added. (WebKit::wallTimeForEvent): (WebKit::modifiersFromWPEModifiers): (WebKit::buttonForWPEButton): (WebKit::buttonFromWPEModifiers): (WebKit::movementDeltaFromEvent): (WebKit::pressedMouseButtons): (WebKit::positionFromEvent): (WebKit::WebEventFactory::createWebMouseEvent): (WebKit::WebEventFactory::createWebWheelEvent): (WebKit::WebEventFactory::createWebKeyboardEvent): (WebKit::WebEventFactory::createWebTouchEvent): * Source/WebKit/Shared/wpe/WebKeyboardEventWPE.cpp: Copied from Source/WebCore/platform/libwpe/PlatformKeyboardEventLibWPE.cpp. (WebKit::WebKeyboardEvent::keyValueStringForWPEKeyval): (WebKit::WebKeyboardEvent::keyCodeStringForWPEKeycode): (WebKit::WebKeyboardEvent::keyIdentifierForWPEKeyval): (WebKit::WebKeyboardEvent::windowsKeyCodeForWPEKeyval): (WebKit::WebKeyboardEvent::singleCharacterStringForWPEKeyval): * Source/WebKit/SourcesWPE.txt: * Source/WebKit/UIProcess/API/C/wpe/WKView.cpp: (WKViewCreate): (WKViewCreateDeprecated): (WKViewGetView): (WKViewSetViewClient): Deleted. * Source/WebKit/UIProcess/API/C/wpe/WKView.h: * Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp: (WebKitWebViewClient::enterFullScreen): (WebKitWebViewClient::exitFullScreen): (webkitWebViewConstructed): (webkitWebViewSetProperty): (webkitWebViewGetProperty): (webkit_web_view_class_init): (webkitWebViewCreatePage): (webkit_web_view_get_display): (webkit_web_view_get_wpe_view): * Source/WebKit/UIProcess/API/glib/WebKitWebView.h.in: * Source/WebKit/UIProcess/API/wpe/APIViewClient.h: (API::ViewClient::enterFullScreen): (API::ViewClient::exitFullScreen): * Source/WebKit/UIProcess/API/wpe/PageClientImpl.cpp: (WebKit::PageClientImpl::wpeView const): (WebKit::PageClientImpl::hostFileDescriptor): (WebKit::PageClientImpl::setCursor): (WebKit::PageClientImpl::setCursorHiddenUntilMouseMoves): (WebKit::PageClientImpl::enterAcceleratedCompositingMode): (WebKit::PageClientImpl::exitAcceleratedCompositingMode): (WebKit::PageClientImpl::updateAcceleratedCompositingMode): (WebKit::PageClientImpl::enterFullScreen): (WebKit::PageClientImpl::exitFullScreen): * Source/WebKit/UIProcess/API/wpe/PageClientImpl.h: * Source/WebKit/UIProcess/API/wpe/WPEWebView.cpp: (WKWPE::View::View): (WKWPE::m_wpeDisplay): (WKWPE::View::~View): (WKWPE::View::isFullScreen const): (WKWPE::View::willEnterFullScreen): (WKWPE::View::enterFullScreen): (WKWPE::View::didEnterFullScreen): (WKWPE::View::willExitFullScreen): (WKWPE::View::exitFullScreen): (WKWPE::View::didExitFullScreen): (WKWPE::View::requestExitFullScreen): (WKWPE::View::setFullScreen): (WKWPE::View::updateAcceleratedSurface): (WKWPE::View::touchPointsForEvent): (WKWPE::View::setCursor): (WKWPE::m_backend): Deleted. * Source/WebKit/UIProcess/API/wpe/WPEWebView.h: (WKWPE::View::create): (WKWPE::View::wpeView const): (WKWPE::View::isFullScreen): Deleted. * Source/WebKit/UIProcess/API/wpe/WebKitWebViewClient.h: * Source/WebKit/UIProcess/API/wpe/WebKitWebViewWPE.cpp: (webkit_web_view_new): * Source/WebKit/UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::creationParameters): (WebKit::WebPageProxy::updateCurrentModifierState): * Source/WebKit/UIProcess/WebPageProxy.h: * Source/WebKit/UIProcess/glib/DisplayVBlankMonitorDRM.cpp: (WebKit::DisplayVBlankMonitorDRM::create): * Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp: (WebKit::WebProcessPool::platformInitializeWebProcess): * Source/WebKit/UIProcess/wpe/AcceleratedBackingStoreDMABuf.cpp: Added. (WebKit::AcceleratedBackingStoreDMABuf::create): (WebKit::AcceleratedBackingStoreDMABuf::AcceleratedBackingStoreDMABuf): (WebKit::AcceleratedBackingStoreDMABuf::~AcceleratedBackingStoreDMABuf): (WebKit::AcceleratedBackingStoreDMABuf::updateSurfaceID): (WebKit::AcceleratedBackingStoreDMABuf::didCreateBuffer): (WebKit::AcceleratedBackingStoreDMABuf::didCreateBufferSHM): (WebKit::AcceleratedBackingStoreDMABuf::didDestroyBuffer): (WebKit::AcceleratedBackingStoreDMABuf::frame): (WebKit::AcceleratedBackingStoreDMABuf::frameDone): (WebKit::AcceleratedBackingStoreDMABuf::bufferRendered): * Source/WebKit/UIProcess/wpe/AcceleratedBackingStoreDMABuf.h: Added. * Source/WebKit/UIProcess/wpe/WebPageProxyWPE.cpp: (WebKit::WebPageProxy::wpeView const): (WebKit::WebPageProxy::preferredBufferFormats const): (WebKit::WebPageProxy::preferredBufferFormatsDidChange): (WebKit::WebPageProxy::currentStateOfModifierKeys): * Source/WebKit/WPEPlatform: Added. * Source/WebKit/WebProcess/WebPage/AcceleratedSurface.cpp: (WebKit::AcceleratedSurface::create): * Source/WebKit/WebProcess/WebPage/AcceleratedSurface.h: (WebKit::AcceleratedSurface::preferredBufferFormatsDidChange): * Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp: (WebKit::DrawingAreaCoordinatedGraphics::preferredBufferFormatsDidChange): * Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.h: * Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp: (WebKit::LayerTreeHost::preferredBufferFormatsDidChange): * Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.h: * Source/WebKit/WebProcess/WebPage/DrawingArea.h: (WebKit::DrawingArea::preferredBufferFormatsDidChange): * Source/WebKit/WebProcess/WebPage/WebPage.cpp: * Source/WebKit/WebProcess/WebPage/WebPage.h: * Source/WebKit/WebProcess/WebPage/WebPage.messages.in: * Source/WebKit/WebProcess/WebPage/dmabuf/AcceleratedSurfaceDMABuf.cpp: (WebKit::AcceleratedSurfaceDMABuf::SwapChain::setupBufferFormat): (WebKit::AcceleratedSurfaceDMABuf::SwapChain::nextTarget): (WebKit::AcceleratedSurfaceDMABuf::preferredBufferFormatsDidChange): * Source/WebKit/WebProcess/WebPage/dmabuf/AcceleratedSurfaceDMABuf.h: * Source/WebKit/WebProcess/WebPage/wpe/WebPageWPE.cpp: (WebKit::WebPage::preferredBufferFormatsDidChange): * Source/WebKit/WebProcess/WebProcess.h: * Source/WebKit/WebProcess/glib/WebProcessGLib.cpp: (WebKit::WebProcess::platformInitializeWebProcess): * Source/WebKit/wpe/wpe-webkit-uninstalled.pc.in: * Source/WebKit/wpe/wpe-webkit.pc.in: * Source/cmake/FindLibInput.cmake: Added. * Source/cmake/FindUdev.cmake: Added. * Source/cmake/OptionsWPE.cmake: * Tools/MiniBrowser/wpe/CMakeLists.txt: * Tools/MiniBrowser/wpe/main.cpp: (createViewBackend): (createWebView): (activate): (main): * Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py: (parse_args): * Tools/Scripts/webkitpy/port/driver.py: (Driver.cmd_line): * Tools/Scripts/webkitpy/port/wpe.py: (WPEPort.setup_environ_for_server): * Tools/Scripts/webkitpy/style/checker.py: * Tools/Scripts/webkitpy/style/checkers/cpp.py: (check_identifier_name_in_declaration): * Tools/TestWebKitAPI/wpe/PlatformWebViewWPE.cpp: (TestWebKitAPI::PlatformWebView::initialize): * Tools/WebKitTestRunner/EventSenderProxy.h: * Tools/WebKitTestRunner/Options.cpp: (WTR::handleOptionWPEPlatformAPI): (WTR::OptionsHandler::OptionsHandler): * Tools/WebKitTestRunner/Options.h: * Tools/WebKitTestRunner/PlatformWPE.cmake: * Tools/WebKitTestRunner/PlatformWebView.h: * Tools/WebKitTestRunner/TestController.cpp: (WTR::TestController::initialize): * Tools/WebKitTestRunner/TestController.h: (WTR::TestController::useWPEPlatformAPI const): * Tools/WebKitTestRunner/libwpe/EventSenderProxyClient.h: Copied from Source/WebKit/UIProcess/API/wpe/APIViewClient.h. (WTR::EventSenderProxyClient::addTouchPoint): (WTR::EventSenderProxyClient::updateTouchPoint): (WTR::EventSenderProxyClient::touchStart): (WTR::EventSenderProxyClient::touchMove): (WTR::EventSenderProxyClient::touchEnd): (WTR::EventSenderProxyClient::touchCancel): (WTR::EventSenderProxyClient::clearTouchPoints): (WTR::EventSenderProxyClient::releaseTouchPoint): (WTR::EventSenderProxyClient::cancelTouchPoint): (WTR::EventSenderProxyClient::EventSenderProxyClient): * Tools/WebKitTestRunner/libwpe/EventSenderProxyClientLibWPE.cpp: Copied from Tools/WebKitTestRunner/libwpe/EventSenderProxyLibWPE.cpp. (WTR::EventSenderProxyClientLibWPE::EventSenderProxyClientLibWPE): (WTR::viewBackend): (WTR::secToMsTimestamp): (WTR::senderButtonToWPEButton): (WTR::modifierForButton): (WTR::wkEventModifiersToWPE): (WTR::EventSenderProxyClientLibWPE::mouseDown): (WTR::EventSenderProxyClientLibWPE::mouseUp): (WTR::EventSenderProxyClientLibWPE::mouseMoveTo): (WTR::EventSenderProxyClientLibWPE::mouseScrollBy): (WTR::wpeKeySymForKeyRef): (WTR::EventSenderProxyClientLibWPE::keyDown): (WTR::EventSenderProxyClientLibWPE::addTouchPoint): (WTR::EventSenderProxyClientLibWPE::updateTouchPoint): (WTR::EventSenderProxyClientLibWPE::touchStart): (WTR::EventSenderProxyClientLibWPE::touchMove): (WTR::EventSenderProxyClientLibWPE::touchEnd): (WTR::EventSenderProxyClientLibWPE::touchCancel): (WTR::EventSenderProxyClientLibWPE::clearTouchPoints): (WTR::EventSenderProxyClientLibWPE::releaseTouchPoint): (WTR::EventSenderProxyClientLibWPE::cancelTouchPoint): (WTR::EventSenderProxyClientLibWPE::getUpdatedTouchEvents): (WTR::EventSenderProxyClientLibWPE::removeUpdatedTouchEvents): (WTR::EventSenderProxyClientLibWPE::prepareAndDispatchTouchEvent): * Tools/WebKitTestRunner/libwpe/EventSenderProxyClientLibWPE.h: Added. * Tools/WebKitTestRunner/libwpe/EventSenderProxyLibWPE.cpp: (WTR::EventSenderProxy::EventSenderProxy): (WTR::EventSenderProxy::mouseDown): (WTR::EventSenderProxy::mouseUp): (WTR::EventSenderProxy::mouseMoveTo): (WTR::EventSenderProxy::mouseScrollBy): (WTR::EventSenderProxy::keyDown): (WTR::EventSenderProxy::addTouchPoint): (WTR::EventSenderProxy::updateTouchPoint): (WTR::EventSenderProxy::touchStart): (WTR::EventSenderProxy::touchMove): (WTR::EventSenderProxy::touchEnd): (WTR::EventSenderProxy::touchCancel): (WTR::EventSenderProxy::clearTouchPoints): (WTR::EventSenderProxy::releaseTouchPoint): (WTR::EventSenderProxy::cancelTouchPoint): (WTR::viewBackend): Deleted. (WTR::secToMsTimestamp): Deleted. (WTR::senderButtonToWPEButton): Deleted. (WTR::modifierForButton): Deleted. (WTR::wkEventModifiersToWPE): Deleted. (WTR::wpeKeySymForKeyRef): Deleted. (WTR::EventSenderProxy::getUpdatedTouchEvents): Deleted. (WTR::EventSenderProxy::removeUpdatedTouchEvents): Deleted. (WTR::EventSenderProxy::prepareAndDispatchTouchEvent): Deleted. * Tools/WebKitTestRunner/libwpe/PlatformWebViewClient.h: Copied from Source/WebKit/UIProcess/API/C/wpe/WKView.h. (WTR::PlatformWebViewClient::view const): * Tools/WebKitTestRunner/libwpe/PlatformWebViewClientLibWPE.cpp: Copied from Source/WebKit/UIProcess/API/C/wpe/WKView.cpp. (WTR::PlatformWebViewClientLibWPE::PlatformWebViewClientLibWPE): (WTR::PlatformWebViewClientLibWPE::~PlatformWebViewClientLibWPE): (WTR::PlatformWebViewClientLibWPE::addToWindow): (WTR::PlatformWebViewClientLibWPE::removeFromWindow): (WTR::PlatformWebViewClientLibWPE::snapshot): * Tools/WebKitTestRunner/libwpe/PlatformWebViewClientLibWPE.h: Copied from Source/WebKit/UIProcess/API/C/wpe/WKView.h. * Tools/WebKitTestRunner/libwpe/PlatformWebViewLibWPE.cpp: (WTR::PlatformWebView::PlatformWebView): (WTR::PlatformWebView::addToWindow): (WTR::PlatformWebView::removeFromWindow): (WTR::PlatformWebView::windowSnapshotImage): * Tools/WebKitTestRunner/wpe/EventSenderProxyClientWPE.cpp: Added. (WTR::EventSenderProxyClientWPE::EventSenderProxyClientWPE): (WTR::secToMsTimestamp): (WTR::wkEventModifiersToWPE): (WTR::eventSenderButtonToWPEButton): (WTR::modifierForButton): (WTR::EventSenderProxyClientWPE::mouseDown): (WTR::EventSenderProxyClientWPE::mouseUp): (WTR::EventSenderProxyClientWPE::mouseMoveTo): (WTR::EventSenderProxyClientWPE::mouseScrollBy): (WTR::wpeKeyvalForKeyRef): (WTR::EventSenderProxyClientWPE::keyDown): * Tools/WebKitTestRunner/wpe/EventSenderProxyClientWPE.h: Copied from Source/WebKit/UIProcess/API/C/wpe/WKView.h. * Tools/WebKitTestRunner/wpe/PlatformWebViewClientWPE.cpp: Added. (WTR::PlatformWebViewClientWPE::PlatformWebViewClientWPE): (WTR::PlatformWebViewClientWPE::~PlatformWebViewClientWPE): (WTR::PlatformWebViewClientWPE::addToWindow): (WTR::PlatformWebViewClientWPE::removeFromWindow): (WTR::PlatformWebViewClientWPE::snapshot): * Tools/WebKitTestRunner/wpe/PlatformWebViewClientWPE.h: Copied from Source/WebKit/UIProcess/API/C/wpe/WKView.h. Canonical link: https://commits.webkit.org/271330@main
- Loading branch information