Changeset 216497 in webkit


Ignore:
Timestamp:
May 9, 2017, 4:07:57 AM (8 years ago)
Author:
zandobersek@gmail.com
Message:

Upstream the WPE port
https://bugs.webkit.org/show_bug.cgi?id=171110

Reviewed by Alex Christensen.

.:

webkit-dev thread:
https://lists.webkit.org/pipermail/webkit-dev/2017-April/028923.html

  • CMakeLists.txt: Add the WPE port identifier.
  • Source/cmake/FindLibGBM.cmake: Added.
  • Source/cmake/FindWPEBackend-mesa.cmake: Added.
  • Source/cmake/FindWPEBackend.cmake: Added.
  • Source/cmake/OptionsWPE.cmake: Added.

Source/JavaScriptCore:

  • PlatformWPE.cmake: Added.
  • shell/PlatformWPE.cmake: Added.

Source/ThirdParty/ANGLE:

  • include/EGL/eglplatform.h:

Allow building WPE on platforms that don't provide X11 libraries.

Source/WebCore:

webkit-dev thread:
https://lists.webkit.org/pipermail/webkit-dev/2017-April/028923.html

Existing files mostly changed to properly use PLATFORM(WPE) build guards.
In-file changes removed from this ChangeLog entry for brevity.

  • CMakeLists.txt:
  • PlatformWPE.cmake: Added.
  • accessibility/AccessibilityObject.h:
  • accessibility/wpe/AXObjectCacheWPE.cpp: Added.
  • accessibility/wpe/AccessibilityObjectWPE.cpp: Copied from Source/WebCore/platform/audio/glib/AudioBusGLib.cpp.
  • config.h:
  • crypto/keys/CryptoKeyEC.h:
  • crypto/keys/CryptoKeyRSA.h:
  • editing/Editor.cpp:
  • editing/Editor.h:
  • editing/wpe/EditorWPE.cpp: Added.
  • page/EventHandler.cpp:
  • page/wpe/EventHandlerWPE.cpp: Added.
  • platform/Cursor.h:
  • platform/DragData.h:
  • platform/DragImage.h:
  • platform/FileSystem.h:
  • platform/MainThreadSharedTimer.cpp:
  • platform/MainThreadSharedTimer.h:
  • platform/Pasteboard.h:
  • platform/PasteboardStrategy.h:
  • platform/PlatformPasteboard.h:
  • platform/SchemeRegistry.cpp:
  • platform/Widget.h:
  • platform/audio/glib/AudioBusGLib.cpp:
  • platform/glib/FileSystemGlib.cpp:
  • platform/graphics/ANGLEWebKitBridge.h:
  • platform/graphics/GLContext.cpp:
  • platform/graphics/GLContext.h:
  • platform/graphics/GraphicsContext3D.h:
  • platform/graphics/OpenGLESShims.h:
  • platform/graphics/PlatformDisplay.cpp:
  • platform/graphics/PlatformDisplay.h:
  • platform/graphics/egl/GLContextEGL.cpp:
  • platform/graphics/egl/GLContextEGL.h:
  • platform/graphics/egl/GLContextEGLWPE.cpp: Copied from Source/WebCore/platform/audio/glib/AudioBusGLib.cpp.
  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
  • platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
  • platform/graphics/wpe/IconWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
  • platform/graphics/wpe/ImageWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
  • platform/graphics/wpe/PlatformDisplayWPE.cpp: Added.
  • platform/graphics/wpe/PlatformDisplayWPE.h: Added.
  • platform/wpe/CursorWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
  • platform/wpe/LocalizedStringsWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
  • platform/wpe/PasteboardWPE.cpp: Added.
  • platform/wpe/PlatformKeyboardEventWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
  • platform/wpe/PlatformPasteboardWPE.cpp: Added.
  • platform/wpe/PlatformScreenWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
  • platform/wpe/RenderThemeWPE.cpp: Copied from Source/WebKit2/Shared/NativeWebWheelEvent.h.
  • platform/wpe/RenderThemeWPE.h: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
  • platform/wpe/ScrollbarThemeWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
  • platform/wpe/ScrollbarThemeWPE.h: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
  • platform/wpe/SoundWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
  • platform/wpe/ThemeWPE.cpp: Added.
  • platform/wpe/ThemeWPE.h: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
  • platform/wpe/WidgetWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.

Source/WebCore/PAL:

  • pal/PlatformWPE.cmake: Added.

Source/WebKit2:

webkit-dev thread:
https://lists.webkit.org/pipermail/webkit-dev/2017-April/028923.html

Existing files changed to properly use PLATFORM(WPE) build guards or other
WPE-specific additions (e.g. pasteboard support).
In-file changes removed from this ChangeLog entry for brevity.

  • Platform/IPC/glib/GSocketMonitor.cpp:
  • PlatformWPE.cmake: Added.
  • Scripts/generate-forwarding-headers.pl:
  • Shared/API/c/WKBase.h:
  • Shared/API/c/wpe/WKBaseWPE.h: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
  • Shared/API/c/wpe/WebKit.h: Added.
  • Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.cpp:
  • Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.h:
  • Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
  • Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
  • Shared/DrawingAreaInfo.h:
  • Shared/NativeWebKeyboardEvent.h:
  • Shared/NativeWebMouseEvent.h:
  • Shared/NativeWebTouchEvent.h:
  • Shared/NativeWebWheelEvent.h:
  • Shared/WebCoreArgumentCoders.cpp:
  • Shared/WebCoreArgumentCoders.h:
  • Shared/WebPreferencesDefinitions.h:
  • Shared/wpe/NativeWebKeyboardEventWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
  • Shared/wpe/NativeWebMouseEventWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
  • Shared/wpe/NativeWebTouchEventWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
  • Shared/wpe/NativeWebWheelEventWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
  • Shared/wpe/ProcessExecutablePathWPE.cpp: Added.
  • Shared/wpe/WebEventFactory.cpp: Added.
  • Shared/wpe/WebEventFactory.h: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
  • UIProcess/API/C/WKAPICast.h:
  • UIProcess/API/C/wpe/WKAPICastWPE.h: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
  • UIProcess/API/C/wpe/WKView.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
  • UIProcess/API/C/wpe/WKView.h: Copied from Source/WebKit2/Shared/NativeWebWheelEvent.h.
  • UIProcess/API/wpe/CompositingManagerProxy.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
  • UIProcess/API/wpe/CompositingManagerProxy.h: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
  • UIProcess/API/wpe/CompositingManagerProxy.messages.in: Added.
  • UIProcess/API/wpe/DrawingAreaProxyWPE.cpp: Added.
  • UIProcess/API/wpe/DrawingAreaProxyWPE.h: Copied from Source/WebKit2/Shared/NativeWebWheelEvent.h.
  • UIProcess/API/wpe/PageClientImpl.cpp: Added.
  • UIProcess/API/wpe/PageClientImpl.h: Added.
  • UIProcess/API/wpe/ScrollGestureController.cpp: Added.
  • UIProcess/API/wpe/ScrollGestureController.h: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
  • UIProcess/API/wpe/WPEView.cpp: Added.
  • UIProcess/API/wpe/WPEView.h: Added.
  • UIProcess/API/wpe/WPEViewClient.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
  • UIProcess/API/wpe/WPEViewClient.h: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
  • UIProcess/API/wpe/WebKit2InspectorGResourceBundle.xml: Added.
  • UIProcess/ChildProcessProxy.cpp:
  • UIProcess/Launcher/ProcessLauncher.h:
  • UIProcess/Launcher/wpe/ProcessLauncherWPE.cpp: Added.
  • UIProcess/WebInspectorProxy.h:
  • UIProcess/WebPasteboardProxy.h:
  • UIProcess/WebPasteboardProxy.messages.in:
  • UIProcess/WebProcessPool.cpp:
  • UIProcess/wpe/TextCheckerWPE.cpp: Added.
  • UIProcess/wpe/WebInspectorProxyWPE.cpp: Added.
  • UIProcess/wpe/WebPageProxyWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
  • UIProcess/wpe/WebPasteboardProxyWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
  • UIProcess/wpe/WebPreferencesWPE.cpp: Copied from Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.h.
  • UIProcess/wpe/WebProcessPoolWPE.cpp: Added.
  • WebKit2.xcodeproj/project.pbxproj:
  • WebKit2Prefix.h:
  • WebProcess/WebCoreSupport/WebEditorClient.cpp:
  • WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
  • WebProcess/WebCoreSupport/WebPlatformStrategies.h:
  • WebProcess/WebCoreSupport/wpe/WebContextMenuClientWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
  • WebProcess/WebCoreSupport/wpe/WebEditorClientWPE.cpp: Added.
  • WebProcess/WebCoreSupport/wpe/WebPopupMenuWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
  • WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
  • WebProcess/WebPage/DrawingArea.cpp:
  • WebProcess/WebPage/WebPage.cpp:
  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/wpe/CompositingManager.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
  • WebProcess/WebPage/wpe/CompositingManager.h: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
  • WebProcess/WebPage/wpe/DrawingAreaWPE.cpp: Added.
  • WebProcess/WebPage/wpe/DrawingAreaWPE.h: Added.
  • WebProcess/WebPage/wpe/WebInspectorUIWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
  • WebProcess/WebPage/wpe/WebInspectorWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
  • WebProcess/WebPage/wpe/WebPageWPE.cpp: Copied from Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.h.
  • WebProcess/wpe/WebProcessMainWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
  • wpe/wpe-webkit.pc.in: Added.

Source/WTF:

  • wtf/Platform.h:
  • wtf/PlatformWPE.cmake: Added.
  • wtf/glib/RunLoopSourcePriority.h:

Tools:

webkit-dev thread:
https://lists.webkit.org/pipermail/webkit-dev/2017-April/028923.html

Add WPE support to various tooling scripts, TestWebKitAPI and WebKitTestRunner.
In-file changes removed from this ChangeLog entry for brevity.

  • BuildSlaveSupport/built-product-archive:
  • BuildSlaveSupport/test-result-archive:
  • CMakeLists.txt:
  • ImageDiff/PlatformWPE.cmake: Added.
  • Scripts/build-dumprendertree:
  • Scripts/build-webkit:
  • Scripts/build-webkittestrunner:
  • Scripts/update-webkit-libs-jhbuild:
  • Scripts/update-webkitwpe-libs: Added.
  • Scripts/webkitdirs.pm:
  • Scripts/webkitperl/FeatureList.pm:
  • Scripts/webkitpy/layout_tests/run_webkit_tests.py:
  • Scripts/webkitpy/port/factory.py:
  • Scripts/webkitpy/port/wpe.py: Added.
  • TestWebKitAPI/PlatformWPE.cmake: Added.
  • TestWebKitAPI/wpe/InjectedBundleControllerWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
  • TestWebKitAPI/wpe/PlatformUtilitiesWPE.cpp: Added.
  • TestWebKitAPI/wpe/main.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
  • WebKitTestRunner/InjectedBundle/AccessibilityController.cpp:
  • WebKitTestRunner/InjectedBundle/AccessibilityController.h:
  • WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
  • WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:
  • WebKitTestRunner/InjectedBundle/TestRunner.h:
  • WebKitTestRunner/InjectedBundle/wpe/AccessibilityControllerWPE.cpp: Added.
  • WebKitTestRunner/InjectedBundle/wpe/AccessibilityUIElementWPE.cpp: Added.
  • WebKitTestRunner/InjectedBundle/wpe/ActivateFontsWPE.cpp: Added.
  • WebKitTestRunner/InjectedBundle/wpe/InjectedBundleWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
  • WebKitTestRunner/InjectedBundle/wpe/TestRunnerWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
  • WebKitTestRunner/PlatformWPE.cmake: Added.
  • WebKitTestRunner/PlatformWebView.h:
  • WebKitTestRunner/TestController.cpp:
  • WebKitTestRunner/wpe/EventSenderProxyWPE.cpp: Added.
  • WebKitTestRunner/wpe/HeadlessViewBackend.cpp: Added.
  • WebKitTestRunner/wpe/HeadlessViewBackend.h: Copied from Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.h.
  • WebKitTestRunner/wpe/PlatformWebViewWPE.cpp: Added.
  • WebKitTestRunner/wpe/TestControllerWPE.cpp: Added.
  • WebKitTestRunner/wpe/main.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
  • jhbuild/jhbuild-wrapper:
  • wpe/generate-inspector-gresource-manifest.py: Added.
  • wpe/jhbuild.modules: Added.
  • wpe/jhbuildrc: Added.
  • wpe/patches/cairo-egl-device-create-for-egl-surface.patch: Added.
  • wpe/patches/fontconfig-C-11-requires-a-space-between-literal-and-identifier.patch: Added.
  • wpe/patches/freetype6-2.4.11-truetype-font-height-fix.patch: Added.
  • wpe/patches/gdate-suppress-string-format-literal-warning.patch: Added.
  • wpe/patches/glib-warning-fix.patch: Added.
  • wpe/patches/gst-plugins-bad-0001-dtls-port-to-OpenSSL-1.1.0.patch: Added.
  • wpe/patches/gst-plugins-bad-0002-dtlscertificate-Fix-error-checking-in-RSA_generate_k.patch: Added.
  • wpe/patches/gst-plugins-good-Revert-qtdemux-expose-streams-with-first-moof-for-fr.patch: Added.
  • wpe/patches/gst-plugins-good-use-the-tfdt-decode-time.patch: Added.
  • wpe/patches/gstreamer-typefind-Only-push-a-CAPS-event-downstream-if-the-.patch: Added.
Location:
trunk
Files:
130 added
95 edited

Legend:

Unmodified
Added
Removed
  • trunk/CMakeLists.txt

    r211027 r216497  
    2828    JSCOnly
    2929    Mac
     30    WPE
    3031    WinCairo
    3132)
  • trunk/ChangeLog

    r216234 r216497  
     12017-05-09  Zan Dobersek  <zdobersek@igalia.com>
     2
     3        Upstream the WPE port
     4        https://bugs.webkit.org/show_bug.cgi?id=171110
     5
     6        Reviewed by Alex Christensen.
     7
     8        webkit-dev thread:
     9        https://lists.webkit.org/pipermail/webkit-dev/2017-April/028923.html
     10
     11        * CMakeLists.txt: Add the WPE port identifier.
     12        * Source/cmake/FindLibGBM.cmake: Added.
     13        * Source/cmake/FindWPEBackend-mesa.cmake: Added.
     14        * Source/cmake/FindWPEBackend.cmake: Added.
     15        * Source/cmake/OptionsWPE.cmake: Added.
     16
    1172017-05-04  Commit Queue  <commit-queue@webkit.org>
    218
  • trunk/Source/JavaScriptCore/ChangeLog

    r216481 r216497  
     12017-05-09  Zan Dobersek  <zdobersek@igalia.com>
     2
     3        Upstream the WPE port
     4        https://bugs.webkit.org/show_bug.cgi?id=171110
     5
     6        Reviewed by Alex Christensen.
     7
     8        * PlatformWPE.cmake: Added.
     9        * shell/PlatformWPE.cmake: Added.
     10
    1112017-05-09  Saam Barati  <sbarati@apple.com>
    212
  • trunk/Source/ThirdParty/ANGLE/ChangeLog

    r216227 r216497  
     12017-05-09  Zan Dobersek  <zdobersek@igalia.com>
     2
     3        Upstream the WPE port
     4        https://bugs.webkit.org/show_bug.cgi?id=171110
     5
     6        Reviewed by Alex Christensen.
     7
     8        * include/EGL/eglplatform.h:
     9        Allow building WPE on platforms that don't provide X11 libraries.
     10
    1112017-05-04  Don Olmstead  <don.olmstead@am.sony.com>
    212
  • trunk/Source/ThirdParty/ANGLE/include/EGL/eglplatform.h

    r215490 r216497  
    100100typedef void*                           EGLNativeDisplayType;
    101101
    102 #elif defined(USE_OZONE)
     102#elif defined(USE_OZONE) || defined(USE_WPE)
    103103
    104104typedef intptr_t EGLNativeDisplayType;
  • trunk/Source/WTF/ChangeLog

    r216444 r216497  
     12017-05-09  Zan Dobersek  <zdobersek@igalia.com>
     2
     3        Upstream the WPE port
     4        https://bugs.webkit.org/show_bug.cgi?id=171110
     5
     6        Reviewed by Alex Christensen.
     7
     8        * wtf/Platform.h:
     9        * wtf/PlatformWPE.cmake: Added.
     10        * wtf/glib/RunLoopSourcePriority.h:
     11
    1122017-05-08  Mark Lam  <mark.lam@apple.com>
    213
  • trunk/Source/WTF/wtf/Platform.h

    r216151 r216497  
    466466#if defined(BUILDING_GTK__)
    467467#define WTF_PLATFORM_GTK 1
     468#elif defined(BUILDING_WPE__)
     469#define WTF_PLATFORM_WPE 1
    468470#elif defined(BUILDING_JSCONLY__)
    469471/* JSCOnly does not provide PLATFORM() macro */
     
    510512#endif
    511513
    512 #if PLATFORM(GTK)
     514#if PLATFORM(GTK) || PLATFORM(WPE)
    513515#define USE_CAIRO 1
    514516#define USE_GLIB 1
     
    626628
    627629#if !defined(HAVE_ACCESSIBILITY)
    628 #if PLATFORM(COCOA) || PLATFORM(WIN) || PLATFORM(GTK)
     630#if PLATFORM(COCOA) || PLATFORM(WIN) || PLATFORM(GTK) || PLATFORM(WPE)
    629631#define HAVE_ACCESSIBILITY 1
    630632#endif
     
    777779#endif
    778780/* Enable the DFG JIT on ARMv7.  Only tested on iOS and Qt/GTK+ Linux. */
    779 #if (CPU(ARM_THUMB2) || CPU(ARM64)) && (PLATFORM(IOS) || PLATFORM(GTK))
     781#if (CPU(ARM_THUMB2) || CPU(ARM64)) && (PLATFORM(IOS) || PLATFORM(GTK) || PLATFORM(WPE))
    780782#define ENABLE_DFG_JIT 1
    781783#endif
     
    964966/* CSS Selector JIT Compiler */
    965967#if !defined(ENABLE_CSS_SELECTOR_JIT)
    966 #if (CPU(X86_64) || CPU(ARM64) || (CPU(ARM_THUMB2) && PLATFORM(IOS))) && ENABLE(JIT) && (OS(DARWIN) || PLATFORM(GTK))
     968#if (CPU(X86_64) || CPU(ARM64) || (CPU(ARM_THUMB2) && PLATFORM(IOS))) && ENABLE(JIT) && (OS(DARWIN) || PLATFORM(GTK) || PLATFORM(WPE))
    967969#define ENABLE_CSS_SELECTOR_JIT 1
    968970#else
     
    10311033#endif
    10321034
    1033 #if PLATFORM(GTK)
     1035#if PLATFORM(GTK) || PLATFORM(WPE)
    10341036#define USE_UNIX_DOMAIN_SOCKETS 1
    10351037#endif
     
    10811083#endif
    10821084
    1083 #if PLATFORM(COCOA) || PLATFORM(GTK) || (PLATFORM(WIN) && !USE(WINGDI))
     1085#if PLATFORM(COCOA) || PLATFORM(GTK) || PLATFORM(WPE) || (PLATFORM(WIN) && !USE(WINGDI))
    10841086#define USE_REQUEST_ANIMATION_FRAME_TIMER 1
    10851087#endif
    10861088
    1087 #if PLATFORM(COCOA) || PLATFORM(GTK)
     1089#if PLATFORM(COCOA) || PLATFORM(GTK) || PLATFORM(WPE)
    10881090#define USE_REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR 1
    10891091#endif
     
    11481150#endif
    11491151
    1150 #if PLATFORM(GTK)
     1152#if PLATFORM(GTK) || PLATFORM(WPE)
    11511153#undef ENABLE_OPENTYPE_VERTICAL
    11521154#define ENABLE_OPENTYPE_VERTICAL 1
  • trunk/Source/WTF/wtf/glib/RunLoopSourcePriority.h

    r215455 r216497  
    2323
    2424namespace WTF {
     25
     26#if PLATFORM(GTK)
    2527
    2628// This is a global enum to define priorities used by GLib run loop sources.
     
    8183};
    8284
     85#elif PLATFORM(WPE)
     86
     87enum RunLoopSourcePriority {
     88    RunLoopDispatcher = -70,
     89    RunLoopTimer = -70,
     90
     91    MainThreadDispatcherTimer = -60,
     92
     93    MemoryPressureHandlerTimer = -80,
     94
     95    JavascriptTimer = -60,
     96    MainThreadSharedTimer = -60,
     97
     98    LayerFlushTimer = -70,
     99    DisplayRefreshMonitorTimer = -70,
     100
     101    CompositingThreadUpdateTimer = -70,
     102
     103    ReleaseUnusedResourcesTimer = -70,
     104
     105    AsyncIONetwork = -70,
     106    DiskCacheRead = -70,
     107    DiskCacheWrite = -60
     108};
     109
     110#endif
     111
    83112} // namespace WTF
    84113
  • trunk/Source/WebCore/CMakeLists.txt

    r216477 r216497  
    40044004        PROPERTY COMPILE_DEFINITIONS
    40054005        ANGLE_ENABLE_ESSL
    4006         ANGLE_ENABLE_GLSL)
     4006        ANGLE_ENABLE_GLSL
     4007        ${ANGLE_PLATFORM_DEFINITIONS})
    40074008
    40084009    target_include_directories(ANGLESupport PRIVATE
  • trunk/Source/WebCore/ChangeLog

    r216488 r216497  
     12017-05-09  Zan Dobersek  <zdobersek@igalia.com>
     2
     3        Upstream the WPE port
     4        https://bugs.webkit.org/show_bug.cgi?id=171110
     5
     6        Reviewed by Alex Christensen.
     7
     8        webkit-dev thread:
     9        https://lists.webkit.org/pipermail/webkit-dev/2017-April/028923.html
     10
     11        Existing files mostly changed to properly use PLATFORM(WPE) build guards.
     12        In-file changes removed from this ChangeLog entry for brevity.
     13
     14        * CMakeLists.txt:
     15        * PlatformWPE.cmake: Added.
     16        * accessibility/AccessibilityObject.h:
     17        * accessibility/wpe/AXObjectCacheWPE.cpp: Added.
     18        * accessibility/wpe/AccessibilityObjectWPE.cpp: Copied from Source/WebCore/platform/audio/glib/AudioBusGLib.cpp.
     19        * config.h:
     20        * crypto/keys/CryptoKeyEC.h:
     21        * crypto/keys/CryptoKeyRSA.h:
     22        * editing/Editor.cpp:
     23        * editing/Editor.h:
     24        * editing/wpe/EditorWPE.cpp: Added.
     25        * page/EventHandler.cpp:
     26        * page/wpe/EventHandlerWPE.cpp: Added.
     27        * platform/Cursor.h:
     28        * platform/DragData.h:
     29        * platform/DragImage.h:
     30        * platform/FileSystem.h:
     31        * platform/MainThreadSharedTimer.cpp:
     32        * platform/MainThreadSharedTimer.h:
     33        * platform/Pasteboard.h:
     34        * platform/PasteboardStrategy.h:
     35        * platform/PlatformPasteboard.h:
     36        * platform/SchemeRegistry.cpp:
     37        * platform/Widget.h:
     38        * platform/audio/glib/AudioBusGLib.cpp:
     39        * platform/glib/FileSystemGlib.cpp:
     40        * platform/graphics/ANGLEWebKitBridge.h:
     41        * platform/graphics/GLContext.cpp:
     42        * platform/graphics/GLContext.h:
     43        * platform/graphics/GraphicsContext3D.h:
     44        * platform/graphics/OpenGLESShims.h:
     45        * platform/graphics/PlatformDisplay.cpp:
     46        * platform/graphics/PlatformDisplay.h:
     47        * platform/graphics/egl/GLContextEGL.cpp:
     48        * platform/graphics/egl/GLContextEGL.h:
     49        * platform/graphics/egl/GLContextEGLWPE.cpp: Copied from Source/WebCore/platform/audio/glib/AudioBusGLib.cpp.
     50        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
     51        * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
     52        * platform/graphics/wpe/IconWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
     53        * platform/graphics/wpe/ImageWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
     54        * platform/graphics/wpe/PlatformDisplayWPE.cpp: Added.
     55        * platform/graphics/wpe/PlatformDisplayWPE.h: Added.
     56        * platform/wpe/CursorWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
     57        * platform/wpe/LocalizedStringsWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
     58        * platform/wpe/PasteboardWPE.cpp: Added.
     59        * platform/wpe/PlatformKeyboardEventWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
     60        * platform/wpe/PlatformPasteboardWPE.cpp: Added.
     61        * platform/wpe/PlatformScreenWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
     62        * platform/wpe/RenderThemeWPE.cpp: Copied from Source/WebKit2/Shared/NativeWebWheelEvent.h.
     63        * platform/wpe/RenderThemeWPE.h: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
     64        * platform/wpe/ScrollbarThemeWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
     65        * platform/wpe/ScrollbarThemeWPE.h: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
     66        * platform/wpe/SoundWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
     67        * platform/wpe/ThemeWPE.cpp: Added.
     68        * platform/wpe/ThemeWPE.h: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
     69        * platform/wpe/WidgetWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
     70
    1712017-05-09  Frederic Wang  <fwang@igalia.com>
    272
  • trunk/Source/WebCore/PAL/ChangeLog

    r216234 r216497  
     12017-05-09  Zan Dobersek  <zdobersek@igalia.com>
     2
     3        Upstream the WPE port
     4        https://bugs.webkit.org/show_bug.cgi?id=171110
     5
     6        Reviewed by Alex Christensen.
     7
     8        * pal/PlatformWPE.cmake: Added.
     9
    1102017-05-04  Commit Queue  <commit-queue@webkit.org>
    211
  • trunk/Source/WebCore/accessibility/AccessibilityObject.h

    r216425 r216497  
    6767typedef struct _AtkObject AtkObject;
    6868typedef struct _AtkObject AccessibilityObjectWrapper;
     69#elif PLATFORM(WPE)
     70class AccessibilityObjectWrapper : public RefCounted<AccessibilityObjectWrapper> { };
    6971#else
    7072class AccessibilityObjectWrapper;
     
    11531155#elif PLATFORM(GTK)
    11541156    AtkObject* m_wrapper;
     1157#elif PLATFORM(WPE)
     1158    RefPtr<AccessibilityObjectWrapper> m_wrapper;
    11551159#endif
    11561160};
  • trunk/Source/WebCore/config.h

    r216227 r216497  
    9797#endif
    9898
    99 #if PLATFORM(MAC)
     99#if PLATFORM(MAC) || PLATFORM(WPE)
    100100#define USE_NEW_THEME 1
    101101#endif
  • trunk/Source/WebCore/crypto/keys/CryptoKeyEC.h

    r214825 r216497  
    3737#endif
    3838
    39 #if PLATFORM(GTK)
     39#if PLATFORM(GTK) || PLATFORM(WPE)
    4040// gcry_sexp* equates gcry_sexp_t.
    4141struct gcry_sexp;
  • trunk/Source/WebCore/crypto/keys/CryptoKeyRSA.h

    r215085 r216497  
    3737#endif
    3838
    39 #if PLATFORM(GTK)
     39#if PLATFORM(GTK) || PLATFORM(WPE)
    4040// gcry_sexp* equates gcry_sexp_t.
    4141struct gcry_sexp;
  • trunk/Source/WebCore/editing/Editor.cpp

    r216426 r216497  
    12461246
    12471247        if (imageElement) {
    1248 #if PLATFORM(COCOA) || PLATFORM(GTK)
     1248#if PLATFORM(COCOA) || PLATFORM(GTK) || PLATFORM(WPE)
    12491249            writeImageToPasteboard(*Pasteboard::createForCopyAndPaste(), *imageElement, document().url(), document().title());
    12501250#else
     
    12521252#endif
    12531253        } else {
    1254 #if PLATFORM(COCOA) || PLATFORM(GTK)
     1254#if PLATFORM(COCOA) || PLATFORM(GTK) || PLATFORM(WPE)
    12551255            writeSelectionToPasteboard(*Pasteboard::createForCopyAndPaste());
    12561256#else
     
    13771377        url = result.absoluteImageURL();
    13781378
    1379 #if PLATFORM(COCOA) || PLATFORM(GTK)
     1379#if PLATFORM(COCOA) || PLATFORM(GTK) || PLATFORM(WPE)
    13801380    writeImageToPasteboard(*Pasteboard::createForCopyAndPaste(), *element, url, result.altDisplayString());
    13811381#else
  • trunk/Source/WebCore/editing/Editor.h

    r216351 r216497  
    458458#endif
    459459
    460 #if PLATFORM(COCOA) || PLATFORM(GTK)
     460#if PLATFORM(COCOA) || PLATFORM(GTK) || PLATFORM(WPE)
    461461    WEBCORE_EXPORT void writeSelectionToPasteboard(Pasteboard&);
    462462    WEBCORE_EXPORT void writeImageToPasteboard(Pasteboard&, Element& imageElement, const URL&, const String& title);
  • trunk/Source/WebCore/page/EventHandler.cpp

    r216212 r216497  
    26132613}
    26142614
    2615 #if !PLATFORM(GTK)
     2615#if !PLATFORM(GTK) && !PLATFORM(WPE)
    26162616
    26172617bool EventHandler::shouldTurnVerticalTicksIntoHorizontal(const HitTestResult&, const PlatformWheelEvent&) const
  • trunk/Source/WebCore/platform/Cursor.h

    r212484 r216497  
    7575#elif PLATFORM(GTK)
    7676using PlatformCursor = GRefPtr<GdkCursor>;
     77#elif PLATFORM(WPE)
     78using PlatformCursor = void*;
    7779#endif
    7880
  • trunk/Source/WebCore/platform/DragData.h

    r215917 r216497  
    5454}
    5555typedef WebCore::SelectionData* DragDataRef;
    56 #elif PLATFORM(IOS)
     56#elif PLATFORM(IOS) || PLATFORM(WPE)
    5757typedef void* DragDataRef;
    5858#endif
  • trunk/Source/WebCore/platform/DragImage.h

    r216303 r216497  
    4242#elif PLATFORM(WIN)
    4343typedef struct HBITMAP__* HBITMAP;
    44 #elif PLATFORM(GTK)
     44#elif USE(CAIRO)
    4545#include "RefPtrCairo.h"
    4646#endif
     
    6565#elif PLATFORM(WIN)
    6666typedef HBITMAP DragImageRef;
    67 #elif PLATFORM(GTK)
     67#elif PLATFORM(GTK) || PLATFORM(WPE)
    6868typedef RefPtr<cairo_surface_t> DragImageRef;
    6969#endif
  • trunk/Source/WebCore/platform/FileSystem.h

    r215807 r216497  
    199199#endif
    200200
    201 #if PLATFORM(GTK)
     201#if PLATFORM(GTK) || PLATFORM(WPE)
    202202String filenameForDisplay(const String&);
    203203CString applicationDirectoryPath();
  • trunk/Source/WebCore/platform/MainThreadSharedTimer.cpp

    r194496 r216497  
    3535}
    3636
    37 #if !PLATFORM(GTK)
     37#if !PLATFORM(GTK) && !PLATFORM(WPE)
    3838MainThreadSharedTimer::MainThreadSharedTimer()
    3939{
  • trunk/Source/WebCore/platform/MainThreadSharedTimer.h

    r208415 r216497  
    3131#include <wtf/NeverDestroyed.h>
    3232
    33 #if PLATFORM(GTK)
     33#if PLATFORM(GTK) || PLATFORM(WPE)
    3434#include <wtf/RunLoop.h>
    3535#endif
     
    5555
    5656    std::function<void()> m_firedFunction;
    57 #if PLATFORM(GTK)
     57#if PLATFORM(GTK) || PLATFORM(WPE)
    5858    RunLoop::Timer<MainThreadSharedTimer> m_timer;
    5959#endif
  • trunk/Source/WebCore/platform/Pasteboard.h

    r215962 r216497  
    6363
    6464struct PasteboardWebContent {
    65 #if !(PLATFORM(GTK) || PLATFORM(WIN))
     65#if !(PLATFORM(GTK) || PLATFORM(WIN) || PLATFORM(WPE))
    6666    WEBCORE_EXPORT PasteboardWebContent();
    6767    WEBCORE_EXPORT ~PasteboardWebContent();
     
    8181    String markup;
    8282#endif
     83#if PLATFORM(WPE)
     84    String text;
     85    String markup;
     86#endif
    8387};
    8488
  • trunk/Source/WebCore/platform/PasteboardStrategy.h

    r215840 r216497  
    7474    virtual long setStringForType(const String&, const String& pasteboardType, const String& pasteboardName) = 0;
    7575#endif
     76
    7677#if PLATFORM(GTK)
    7778    virtual void writeToClipboard(const String& pasteboardName, const SelectionData&) = 0;
    7879    virtual Ref<SelectionData> readFromClipboard(const String& pasteboardName) = 0;
    7980#endif // PLATFORM(GTK)
     81
     82#if PLATFORM(WPE)
     83    virtual void getTypes(Vector<String>& types) = 0;
     84    virtual String readStringFromPasteboard(int index, const String& pasteboardType) = 0;
     85    virtual void writeToPasteboard(const PasteboardWebContent&) = 0;
     86    virtual void writeToPasteboard(const String& pasteboardType, const String&) = 0;
     87#endif
     88
    8089protected:
    8190    virtual ~PasteboardStrategy()
  • trunk/Source/WebCore/platform/PlatformPasteboard.h

    r215840 r216497  
    4141#endif
    4242
     43#if PLATFORM(WPE)
     44struct wpe_pasteboard;
     45#endif
     46
    4347namespace WebCore {
    4448
     
    5458public:
    5559    WEBCORE_EXPORT explicit PlatformPasteboard(const String& pasteboardName);
    56 #if PLATFORM(IOS)
     60#if PLATFORM(IOS) || PLATFORM(WPE)
    5761    WEBCORE_EXPORT PlatformPasteboard();
    5862    WEBCORE_EXPORT Vector<String> filenamesForDataInteraction();
     
    111115    GtkClipboard* m_clipboard;
    112116#endif
     117#if PLATFORM(WPE)
     118    struct wpe_pasteboard* m_pasteboard;
     119#endif
    113120};
    114121
  • trunk/Source/WebCore/platform/SchemeRegistry.cpp

    r211946 r216497  
    6060        secureSchemes.get().add("data");
    6161        secureSchemes.get().add("wss");
    62 #if PLATFORM(GTK)
     62#if PLATFORM(GTK) || PLATFORM(WPE)
    6363        secureSchemes.get().add("resource");
    6464#endif
  • trunk/Source/WebCore/platform/Widget.h

    r216336 r216497  
    6262#endif
    6363
     64#if PLATFORM(WPE)
     65typedef void* PlatformWidget;
     66#endif
     67
    6468typedef PlatformWidget PlatformPageClient;
    6569
  • trunk/Source/WebCore/platform/audio/glib/AudioBusGLib.cpp

    r193814 r216497  
    2828#include <wtf/glib/GUniquePtr.h>
    2929
     30#if PLATFORM(GTK)
     31#define AUDIO_GRESOURCE_PATH "/org/webkitgtk/resources/audio"
     32#elif PLATFORM(WPE)
     33#define AUDIO_GRESOURCE_PATH "/org/webkitwpe/resources/audio"
     34#endif
     35
    3036namespace WebCore {
    3137
    3238PassRefPtr<AudioBus> AudioBus::loadPlatformResource(const char* name, float sampleRate)
    3339{
    34     GUniquePtr<char> path(g_strdup_printf("/org/webkitgtk/resources/audio/%s", name));
     40    GUniquePtr<char> path(g_strdup_printf(AUDIO_GRESOURCE_PATH "/%s", name));
    3541    GRefPtr<GBytes> data = adoptGRef(g_resources_lookup_data(path.get(), G_RESOURCE_LOOKUP_FLAGS_NONE, nullptr));
    3642    ASSERT(data);
  • trunk/Source/WebCore/platform/glib/FileSystemGlib.cpp

    r215922 r216497  
    214214        return cachedPath;
    215215
     216#if PLATFORM(WPE)
     217    GUniquePtr<gchar> dataPath(g_build_filename(DATA_DIR, "wpe", nullptr));
     218#elif PLATFORM(GTK)
    216219#if OS(WINDOWS)
    217220    HMODULE hmodule = 0;
     
    222225#else
    223226    GUniquePtr<gchar> dataPath(g_build_filename(DATA_DIR, "webkitgtk-" WEBKITGTK_API_VERSION_STRING, NULL));
     227#endif
    224228#endif
    225229
  • trunk/Source/WebCore/platform/graphics/ANGLEWebKitBridge.h

    r212484 r216497  
    3737#elif PLATFORM(WIN)
    3838#include "OpenGLESShims.h"
    39 #elif PLATFORM(GTK)
     39#elif PLATFORM(GTK) || PLATFORM(WPE)
    4040#if USE(OPENGL_ES_2)
    4141#include <GLES2/gl2.h>
  • trunk/Source/WebCore/platform/graphics/GLContext.cpp

    r215585 r216497  
    121121#endif
    122122
    123 #if USE(EGL) || PLATFORM(WAYLAND)
     123#if USE(EGL) || PLATFORM(WAYLAND) || PLATFORM(WPE)
    124124    if (auto eglContext = GLContextEGL::createSharingContext(display))
    125125        return WTFMove(eglContext);
  • trunk/Source/WebCore/platform/graphics/GLContext.h

    r208997 r216497  
    2626
    2727#if USE(EGL) && !PLATFORM(GTK)
     28#if PLATFORM(WPE)
     29// FIXME: For now default to the GBM EGL platform, but this should really be
     30// somehow deducible from the build configuration.
     31#define __GBM__ 1
     32#include <EGL/eglplatform.h>
     33#else
    2834#include "eglplatform.h"
     35#endif
    2936typedef EGLNativeWindowType GLNativeWindowType;
    3037#else
  • trunk/Source/WebCore/platform/graphics/GraphicsContext3D.h

    r214162 r216497  
    6161OBJC_CLASS CALayer;
    6262OBJC_CLASS WebGLLayer;
    63 #elif PLATFORM(GTK) || PLATFORM(WIN_CAIRO)
     63#elif PLATFORM(GTK) || PLATFORM(WIN_CAIRO) || PLATFORM(WPE)
    6464typedef unsigned int GLuint;
    6565#endif
     
    13741374    std::unique_ptr<ShaderNameHash> nameHashMapForShaders;
    13751375
    1376 #if ((PLATFORM(GTK) || PLATFORM(WIN)) && USE(OPENGL_ES_2))
     1376#if ((PLATFORM(GTK) || PLATFORM(WIN) || PLATFORM(WPE)) && USE(OPENGL_ES_2))
    13771377    friend class Extensions3DOpenGLES;
    13781378    std::unique_ptr<Extensions3DOpenGLES> m_extensions;
  • trunk/Source/WebCore/platform/graphics/OpenGLESShims.h

    r212521 r216497  
    2727#define OpenGLESShims_h
    2828
    29 #if PLATFORM(GTK) || PLATFORM(WIN)
     29#if PLATFORM(GTK) || PLATFORM(WIN) || PLATFORM(WPE)
    3030#define glBindFramebufferEXT glBindFramebuffer
    3131#define glFramebufferTexture2DEXT glFramebufferTexture2D
     
    4646#define glGenerateMipmapEXT glGenerateMipmap
    4747#define GL_DEPTH_ATTACHMENT_EXT GL_DEPTH_ATTACHMENT
     48#define GL_COLOR_ATTACHMENT0_EXT GL_COLOR_ATTACHMENT0
    4849#define GL_FRAMEBUFFER_COMPLETE_EXT GL_FRAMEBUFFER_COMPLETE
    4950#define GL_FRAMEBUFFER_EXT GL_FRAMEBUFFER
  • trunk/Source/WebCore/platform/graphics/PlatformDisplay.cpp

    r215585 r216497  
    4343#endif
    4444
     45#if PLATFORM(WPE)
     46#include "PlatformDisplayWPE.h"
     47#endif
     48
    4549#if PLATFORM(GTK)
    4650#include <gdk/gdk.h>
     
    99103#if PLATFORM(X11)
    100104    return std::make_unique<PlatformDisplayX11>(nullptr);
     105#endif
     106
     107#if PLATFORM(WPE)
     108    return std::make_unique<PlatformDisplayWPE>();
    101109#endif
    102110
  • trunk/Source/WebCore/platform/graphics/PlatformDisplay.h

    r214688 r216497  
    5555        Windows,
    5656#endif
     57#if PLATFORM(WPE)
     58        WPE,
     59#endif
    5760    };
    5861
  • trunk/Source/WebCore/platform/graphics/egl/GLContextEGL.cpp

    r215585 r216497  
    205205        return nullptr;
    206206
     207#if PLATFORM(WPE)
     208    if (platformDisplay.type() == PlatformDisplay::Type::WPE) {
     209        if (auto context = createWPEContext(platformDisplay))
     210            return context;
     211    }
     212#endif
     213
    207214    auto context = createSurfacelessContext(platformDisplay);
    208215    if (!context) {
     
    252259    destroyWaylandWindow();
    253260#endif
     261#if PLATFORM(WPE)
     262    destroyWPETarget();
     263#endif
    254264}
    255265
  • trunk/Source/WebCore/platform/graphics/egl/GLContextEGL.h

    r207615 r216497  
    3131#include "WlUniquePtr.h"
    3232struct wl_egl_window;
     33#endif
     34
     35#if PLATFORM(WPE)
     36#include "PlatformDisplayWPE.h"
    3337#endif
    3438
     
    7478    void destroyWaylandWindow();
    7579#endif
     80#if PLATFORM(WPE)
     81    void destroyWPETarget();
     82#endif
    7683
    7784    static std::unique_ptr<GLContextEGL> createWindowContext(GLNativeWindowType, PlatformDisplay&, EGLContext sharingContext = nullptr);
     
    8592    static std::unique_ptr<GLContextEGL> createWaylandContext(PlatformDisplay&, EGLContext sharingContext = nullptr);
    8693    static EGLSurface createWindowSurfaceWayland(EGLDisplay, EGLConfig, GLNativeWindowType);
     94#endif
     95#if PLATFORM(WPE)
     96    static std::unique_ptr<GLContextEGL> createWPEContext(PlatformDisplay&, EGLContext sharingContext = nullptr);
    8797#endif
    8898
     
    99109    struct wl_egl_window* m_wlWindow { nullptr };
    100110#endif
     111#if PLATFORM(WPE)
     112    std::unique_ptr<PlatformDisplayWPE::EGLOffscreenTarget> m_wpeTarget;
     113#endif
    101114#if USE(CAIRO)
    102115    cairo_device_t* m_cairoDevice { nullptr };
  • trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp

    r215922 r216497  
    6060
    6161#if USE(EGL)
     62#if !PLATFORM(WPE)
    6263#include "GLContextEGL.h"
     64#endif
    6365#include <gst/gl/egl/gstgldisplay_egl.h>
    6466#endif
     
    7072#if PLATFORM(WAYLAND)
    7173#include "PlatformDisplayWayland.h"
     74#elif PLATFORM(WPE)
     75#include "PlatformDisplayWPE.h"
    7276#endif
    7377
     
    437441        if (is<PlatformDisplayWayland>(sharedDisplay))
    438442            m_glDisplay = GST_GL_DISPLAY(gst_gl_display_egl_new_with_egl_display(downcast<PlatformDisplayWayland>(sharedDisplay).eglDisplay()));
     443#endif
     444
     445#if PLATFORM(WPE)
     446        ASSERT(is<PlatformDisplayWPE>(sharedDisplay));
     447        m_glDisplay = GST_GL_DISPLAY(gst_gl_display_egl_new_with_egl_display(downcast<PlatformDisplayWPE>(sharedDisplay).eglDisplay()));
    439448#endif
    440449
  • trunk/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp

    r215490 r216497  
    399399
    400400    GC3Dint maxVaryingVectors = 0;
    401 #if !PLATFORM(IOS) && !((PLATFORM(WIN) || PLATFORM(GTK)) && USE(OPENGL_ES_2))
     401#if !PLATFORM(IOS) && !((PLATFORM(WIN) || PLATFORM(GTK) || PLATFORM(WPE)) && USE(OPENGL_ES_2))
    402402    GC3Dint maxVaryingFloats = 0;
    403403    ::glGetIntegerv(GL_MAX_VARYING_FLOATS, &maxVaryingFloats);
  • trunk/Source/WebKit2/ChangeLog

    r216483 r216497  
     12017-05-09  Zan Dobersek  <zdobersek@igalia.com>
     2
     3        Upstream the WPE port
     4        https://bugs.webkit.org/show_bug.cgi?id=171110
     5
     6        Reviewed by Alex Christensen.
     7
     8        webkit-dev thread:
     9        https://lists.webkit.org/pipermail/webkit-dev/2017-April/028923.html
     10
     11        Existing files changed to properly use PLATFORM(WPE) build guards or other
     12        WPE-specific additions (e.g. pasteboard support).
     13        In-file changes removed from this ChangeLog entry for brevity.
     14
     15        * Platform/IPC/glib/GSocketMonitor.cpp:
     16        * PlatformWPE.cmake: Added.
     17        * Scripts/generate-forwarding-headers.pl:
     18        * Shared/API/c/WKBase.h:
     19        * Shared/API/c/wpe/WKBaseWPE.h: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
     20        * Shared/API/c/wpe/WebKit.h: Added.
     21        * Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.cpp:
     22        * Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.h:
     23        * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
     24        * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
     25        * Shared/DrawingAreaInfo.h:
     26        * Shared/NativeWebKeyboardEvent.h:
     27        * Shared/NativeWebMouseEvent.h:
     28        * Shared/NativeWebTouchEvent.h:
     29        * Shared/NativeWebWheelEvent.h:
     30        * Shared/WebCoreArgumentCoders.cpp:
     31        * Shared/WebCoreArgumentCoders.h:
     32        * Shared/WebPreferencesDefinitions.h:
     33        * Shared/wpe/NativeWebKeyboardEventWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
     34        * Shared/wpe/NativeWebMouseEventWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
     35        * Shared/wpe/NativeWebTouchEventWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
     36        * Shared/wpe/NativeWebWheelEventWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
     37        * Shared/wpe/ProcessExecutablePathWPE.cpp: Added.
     38        * Shared/wpe/WebEventFactory.cpp: Added.
     39        * Shared/wpe/WebEventFactory.h: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
     40        * UIProcess/API/C/WKAPICast.h:
     41        * UIProcess/API/C/wpe/WKAPICastWPE.h: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
     42        * UIProcess/API/C/wpe/WKView.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
     43        * UIProcess/API/C/wpe/WKView.h: Copied from Source/WebKit2/Shared/NativeWebWheelEvent.h.
     44        * UIProcess/API/wpe/CompositingManagerProxy.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
     45        * UIProcess/API/wpe/CompositingManagerProxy.h: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
     46        * UIProcess/API/wpe/CompositingManagerProxy.messages.in: Added.
     47        * UIProcess/API/wpe/DrawingAreaProxyWPE.cpp: Added.
     48        * UIProcess/API/wpe/DrawingAreaProxyWPE.h: Copied from Source/WebKit2/Shared/NativeWebWheelEvent.h.
     49        * UIProcess/API/wpe/PageClientImpl.cpp: Added.
     50        * UIProcess/API/wpe/PageClientImpl.h: Added.
     51        * UIProcess/API/wpe/ScrollGestureController.cpp: Added.
     52        * UIProcess/API/wpe/ScrollGestureController.h: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
     53        * UIProcess/API/wpe/WPEView.cpp: Added.
     54        * UIProcess/API/wpe/WPEView.h: Added.
     55        * UIProcess/API/wpe/WPEViewClient.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
     56        * UIProcess/API/wpe/WPEViewClient.h: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
     57        * UIProcess/API/wpe/WebKit2InspectorGResourceBundle.xml: Added.
     58        * UIProcess/ChildProcessProxy.cpp:
     59        * UIProcess/Launcher/ProcessLauncher.h:
     60        * UIProcess/Launcher/wpe/ProcessLauncherWPE.cpp: Added.
     61        * UIProcess/WebInspectorProxy.h:
     62        * UIProcess/WebPasteboardProxy.h:
     63        * UIProcess/WebPasteboardProxy.messages.in:
     64        * UIProcess/WebProcessPool.cpp:
     65        * UIProcess/wpe/TextCheckerWPE.cpp: Added.
     66        * UIProcess/wpe/WebInspectorProxyWPE.cpp: Added.
     67        * UIProcess/wpe/WebPageProxyWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
     68        * UIProcess/wpe/WebPasteboardProxyWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
     69        * UIProcess/wpe/WebPreferencesWPE.cpp: Copied from Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.h.
     70        * UIProcess/wpe/WebProcessPoolWPE.cpp: Added.
     71        * WebKit2.xcodeproj/project.pbxproj:
     72        * WebKit2Prefix.h:
     73        * WebProcess/WebCoreSupport/WebEditorClient.cpp:
     74        * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
     75        * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
     76        * WebProcess/WebCoreSupport/wpe/WebContextMenuClientWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
     77        * WebProcess/WebCoreSupport/wpe/WebEditorClientWPE.cpp: Added.
     78        * WebProcess/WebCoreSupport/wpe/WebPopupMenuWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
     79        * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
     80        * WebProcess/WebPage/DrawingArea.cpp:
     81        * WebProcess/WebPage/WebPage.cpp:
     82        * WebProcess/WebPage/WebPage.h:
     83        * WebProcess/WebPage/wpe/CompositingManager.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
     84        * WebProcess/WebPage/wpe/CompositingManager.h: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
     85        * WebProcess/WebPage/wpe/DrawingAreaWPE.cpp: Added.
     86        * WebProcess/WebPage/wpe/DrawingAreaWPE.h: Added.
     87        * WebProcess/WebPage/wpe/WebInspectorUIWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
     88        * WebProcess/WebPage/wpe/WebInspectorWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
     89        * WebProcess/WebPage/wpe/WebPageWPE.cpp: Copied from Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.h.
     90        * WebProcess/wpe/WebProcessMainWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
     91        * wpe/wpe-webkit.pc.in: Added.
     92
    1932017-05-09  Carlos Garcia Campos  <cgarcia@igalia.com>
    294
  • trunk/Source/WebKit2/Platform/IPC/glib/GSocketMonitor.cpp

    r213030 r216497  
    5252    m_callback = WTFMove(callback);
    5353    g_source_set_callback(m_source.get(), reinterpret_cast<GSourceFunc>(socketSourceCallback), this, nullptr);
     54#if PLATFORM(WPE)
     55    g_source_set_priority(m_source.get(), G_PRIORITY_HIGH + 30);
     56#endif
    5457    g_source_attach(m_source.get(), runLoop.mainContext());
    5558}
  • trunk/Source/WebKit2/Scripts/generate-forwarding-headers.pl

    r205012 r216497  
    3636
    3737my $srcRoot = realpath(File::Spec->catfile(dirname(abs_path($0)), "../.."));
    38 my @platformPrefixes = ("ca", "cf", "cocoa", "Cocoa", "CoordinatedGraphics", "curl", "efl", "gtk", "ios", "mac", "soup", "win");
     38my @platformPrefixes = ("ca", "cf", "cocoa", "Cocoa", "CoordinatedGraphics", "curl", "efl", "gtk", "ios", "mac", "soup", "win", "wpe");
    3939my @frameworks = ("JavaScriptCore", "WebCore", "WebKit");
    4040my @skippedPrefixes;
  • trunk/Source/WebKit2/Shared/API/c/WKBase.h

    r212557 r216497  
    3737#if defined(__APPLE__) && !defined(BUILDING_GTK__)
    3838#include <WebKit/WKBaseMac.h>
     39#endif
     40
     41#if defined(BUILDING_WPE__)
     42#include <WebKit/WKBaseWPE.h>
    3943#endif
    4044
  • trunk/Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.cpp

    r215259 r216497  
    7676    WorkQueuePool()
    7777    {
    78 #if PLATFORM(GTK)
     78        // FIXME: This is a sane default limit, but it should be configurable somehow.
    7979        m_threadCountLimit = 1;
    80 #else
    81         m_threadCountLimit = std::numeric_limits<unsigned>::max();
    82 #endif
    8380    }
    8481
  • trunk/Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.h

    r215260 r216497  
    2929#if USE(COORDINATED_GRAPHICS_THREADED)
    3030
     31#include <functional>
    3132#include <wtf/Atomics.h>
    3233#include <wtf/Condition.h>
  • trunk/Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp

    r216182 r216497  
    4545namespace WebKit {
    4646
    47 Ref<ThreadedCompositor> ThreadedCompositor::create(Client& client, const IntSize& viewportSize, float scaleFactor, uint64_t nativeSurfaceHandle, ShouldDoFrameSync doFrameSync, TextureMapper::PaintFlags paintFlags)
    48 {
    49     return adoptRef(*new ThreadedCompositor(client, viewportSize, scaleFactor, nativeSurfaceHandle, doFrameSync, paintFlags));
    50 }
    51 
    52 ThreadedCompositor::ThreadedCompositor(Client& client, const IntSize& viewportSize, float scaleFactor, uint64_t nativeSurfaceHandle, ShouldDoFrameSync doFrameSync, TextureMapper::PaintFlags paintFlags)
     47Ref<ThreadedCompositor> ThreadedCompositor::create(Client& client, WebPage& webPage, const IntSize& viewportSize, float scaleFactor, uint64_t nativeSurfaceHandle, ShouldDoFrameSync doFrameSync, TextureMapper::PaintFlags paintFlags)
     48{
     49    return adoptRef(*new ThreadedCompositor(client, webPage, viewportSize, scaleFactor, nativeSurfaceHandle, doFrameSync, paintFlags));
     50}
     51
     52ThreadedCompositor::ThreadedCompositor(Client& client, WebPage& webPage, const IntSize& viewportSize, float scaleFactor, uint64_t nativeSurfaceHandle, ShouldDoFrameSync doFrameSync, TextureMapper::PaintFlags paintFlags)
    5353    : m_client(client)
    5454    , m_viewportSize(viewportSize)
     
    6666    m_coordinateUpdateCompletionWithClient.store(false);
    6767
     68#if PLATFORM(WPE)
     69    m_compositingManager.establishConnection(webPage);
     70#endif
     71
    6872    m_compositingRunLoop->performTaskSync([this, protectedThis = makeRef(*this)] {
    6973        m_scene = adoptRef(new CoordinatedGraphicsScene(this));
     74#if PLATFORM(GTK)
    7075        if (m_nativeSurfaceHandle) {
    7176            createGLContext();
     
    7378        } else
    7479            m_scene->setActive(false);
     80#elif PLATFORM(WPE)
     81        m_scene->setActive(true);
     82#endif
    7583    });
    7684}
     
    8391{
    8492    ASSERT(!isMainThread());
     93
     94#if PLATFORM(GTK)
    8595    ASSERT(m_nativeSurfaceHandle);
    8696
     
    93103            m_context->swapInterval(0);
    94104    }
     105#endif
     106
     107#if PLATFORM(WPE)
     108    auto& platformDisplay = PlatformDisplay::sharedDisplay();
     109    RELEASE_ASSERT(is<PlatformDisplayWPE>(platformDisplay));
     110    m_target = downcast<PlatformDisplayWPE>(platformDisplay).createEGLTarget(*this, m_compositingManager.releaseConnectionFd());
     111    ASSERT(m_target);
     112    m_target->initialize(m_viewportSize);
     113
     114    m_context = GLContext::createContextForWindow(m_target->nativeWindow(), &platformDisplay);
     115    if (!m_context)
     116        return;
     117
     118    if (!m_context->makeContextCurrent())
     119        return;
     120#endif
    95121}
    96122
     
    102128        m_scene->purgeGLResources();
    103129        m_context = nullptr;
     130#if PLATFORM(WPE)
     131        m_target = nullptr;
     132#endif
    104133        m_scene = nullptr;
    105134    });
     
    108137#endif
    109138    m_compositingRunLoop = nullptr;
     139#if USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR)
     140    m_displayRefreshMonitor->invalidate();
     141#endif
    110142}
    111143
    112144void ThreadedCompositor::setNativeSurfaceHandleForCompositing(uint64_t handle)
    113145{
     146#if PLATFORM(GTK)
    114147    m_compositingRunLoop->stopUpdates();
    115148    m_compositingRunLoop->performTaskSync([this, protectedThis = makeRef(*this), handle] {
     
    125158        }
    126159    });
     160#endif
    127161}
    128162
     
    148182    m_compositingRunLoop->performTaskSync([this, protectedThis = makeRef(*this), viewportSize, scale] {
    149183        m_viewportSize = viewportSize;
     184#if PLATFORM(WPE)
     185        if (m_target)
     186            m_target->resize(viewportSize);
     187#endif
    150188        m_scaleFactor = scale;
    151189        m_needsResize = true;
     
    192230        return;
    193231
     232#if PLATFORM(WPE)
     233    if (!m_context)
     234        createGLContext();
     235#endif
     236
    194237    if (!m_context || !m_context->makeContextCurrent())
    195238        return;
     239
     240#if PLATFORM(WPE)
     241    m_target->frameWillRender();
     242#endif
    196243
    197244    if (m_needsResize) {
     
    214261    m_context->swapBuffers();
    215262
     263#if PLATFORM(WPE)
     264    m_target->frameRendered();
     265#endif
     266
     267#if PLATFORM(GTK)
    216268    sceneUpdateFinished();
     269#endif
    217270}
    218271
     
    281334#endif
    282335
     336#if PLATFORM(WPE)
     337void ThreadedCompositor::frameComplete()
     338{
     339    ASSERT(m_compositingRunLoop->isCurrent());
     340    sceneUpdateFinished();
     341}
     342#endif
     343
    283344}
    284345#endif // USE(COORDINATED_GRAPHICS_THREADED)
  • trunk/Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h

    r216182 r216497  
    4343#endif
    4444
     45#if PLATFORM(WPE)
     46#include "CompositingManager.h"
     47#include <WebCore/PlatformDisplayWPE.h>
     48#endif
     49
    4550namespace WebCore {
    4651struct CoordinatedGraphicsState;
     
    5257class CoordinatedGraphicsSceneClient;
    5358class ThreadedDisplayRefreshMonitor;
     59class WebPage;
    5460
    55 class ThreadedCompositor : public CoordinatedGraphicsSceneClient, public ThreadSafeRefCounted<ThreadedCompositor> {
     61class ThreadedCompositor : public CoordinatedGraphicsSceneClient, public ThreadSafeRefCounted<ThreadedCompositor>
     62#if PLATFORM(WPE)
     63    , public WebCore::PlatformDisplayWPE::EGLTarget::Client
     64#endif
     65    {
    5666    WTF_MAKE_NONCOPYABLE(ThreadedCompositor);
    5767    WTF_MAKE_FAST_ALLOCATED;
     
    6575    enum class ShouldDoFrameSync { No, Yes };
    6676
    67     static Ref<ThreadedCompositor> create(Client&, const WebCore::IntSize&, float scaleFactor, uint64_t nativeSurfaceHandle = 0, ShouldDoFrameSync = ShouldDoFrameSync::Yes, WebCore::TextureMapper::PaintFlags = 0);
     77    static Ref<ThreadedCompositor> create(Client&, WebPage&, const WebCore::IntSize&, float scaleFactor, uint64_t nativeSurfaceHandle = 0, ShouldDoFrameSync = ShouldDoFrameSync::Yes, WebCore::TextureMapper::PaintFlags = 0);
    6878    virtual ~ThreadedCompositor();
    6979
     
    8999
    90100private:
    91     ThreadedCompositor(Client&, const WebCore::IntSize&, float scaleFactor, uint64_t nativeSurfaceHandle, ShouldDoFrameSync, WebCore::TextureMapper::PaintFlags);
     101    ThreadedCompositor(Client&, WebPage&, const WebCore::IntSize&, float scaleFactor, uint64_t nativeSurfaceHandle, ShouldDoFrameSync, WebCore::TextureMapper::PaintFlags);
    92102
    93103    // CoordinatedGraphicsSceneClient
     
    95105    void updateViewport() override;
    96106    void commitScrollOffset(uint32_t layerID, const WebCore::IntSize& offset) override;
     107
     108#if PLATFORM(WPE)
     109    // WebCore::PlatformDisplayWPE::Surface::Client
     110    void frameComplete() override;
     111#endif
    97112
    98113    void renderLayerTree();
     
    103118    Client& m_client;
    104119    RefPtr<CoordinatedGraphicsScene> m_scene;
     120
     121#if PLATFORM(WPE)
     122    CompositingManager m_compositingManager;
     123    std::unique_ptr<WebCore::PlatformDisplayWPE::EGLTarget> m_target;
     124#endif
     125
    105126    std::unique_ptr<WebCore::GLContext> m_context;
    106127
  • trunk/Source/WebKit2/Shared/DrawingAreaInfo.h

    r212608 r216497  
    3535#endif
    3636    DrawingAreaTypeRemoteLayerTree,
     37#elif PLATFORM(WPE)
     38    DrawingAreaTypeWPE
    3739#else
    3840    DrawingAreaTypeImpl
  • trunk/Source/WebKit2/Shared/NativeWebKeyboardEvent.h

    r212557 r216497  
    5252#endif
    5353
     54#if PLATFORM(WPE)
     55struct wpe_input_keyboard_event;
     56#endif
     57
    5458namespace WebKit {
    5559
     
    6367#elif PLATFORM(IOS)
    6468    NativeWebKeyboardEvent(::WebEvent *);
     69#elif PLATFORM(WPE)
     70    NativeWebKeyboardEvent(struct wpe_input_keyboard_event*);
    6571#endif
    6672
     
    7379#elif PLATFORM(IOS)
    7480    ::WebEvent* nativeEvent() const { return m_nativeEvent.get(); }
     81#elif PLATFORM(WPE)
     82    const void* nativeEvent() const { return nullptr; }
    7583#endif
    7684
  • trunk/Source/WebKit2/Shared/NativeWebMouseEvent.h

    r212557 r216497  
    3939#endif
    4040
     41#if PLATFORM(WPE)
     42struct wpe_input_pointer_event;
     43#endif
     44
    4145namespace WebKit {
    4246
     
    4852    NativeWebMouseEvent(const NativeWebMouseEvent&);
    4953    NativeWebMouseEvent(GdkEvent*, int);
     54#elif PLATFORM(WPE)
     55    NativeWebMouseEvent(struct wpe_input_pointer_event*, float deviceScaleFactor);
    5056#endif
    5157
     
    5662#elif PLATFORM(IOS)
    5763    const void* nativeEvent() const { return 0; }
     64#elif PLATFORM(WPE)
     65    const void* nativeEvent() const { return nullptr; }
    5866#endif
    5967
  • trunk/Source/WebKit2/Shared/NativeWebTouchEvent.h

    r212557 r216497  
    3535#elif PLATFORM(GTK)
    3636#include <WebCore/GUniquePtrGtk.h>
     37#elif PLATFORM(WPE)
     38#include <wpe/input.h>
    3739#endif
    3840
     
    4749    NativeWebTouchEvent(const NativeWebTouchEvent&);
    4850    const GdkEvent* nativeEvent() const { return m_nativeEvent.get(); }
     51#elif PLATFORM(WPE)
     52    NativeWebTouchEvent(struct wpe_input_touch_event*, float deviceScaleFactor);
     53    const struct wpe_input_touch_event_raw* nativeFallbackTouchPoint() const { return &m_fallbackTouchPoint; }
    4954#endif
    5055
     
    5661#if PLATFORM(GTK)
    5762    GUniquePtr<GdkEvent> m_nativeEvent;
     63#elif PLATFORM(WPE)
     64    struct wpe_input_touch_event_raw m_fallbackTouchPoint;
    5865#endif
    5966};
  • trunk/Source/WebKit2/Shared/NativeWebWheelEvent.h

    r212557 r216497  
    3939#endif
    4040
     41#if PLATFORM(WPE)
     42struct wpe_input_axis_event;
     43#endif
     44
    4145namespace WebKit {
    4246
     
    4852    NativeWebWheelEvent(const NativeWebWheelEvent&);
    4953    NativeWebWheelEvent(GdkEvent*);
     54#elif PLATFORM(WPE)
     55    NativeWebWheelEvent(struct wpe_input_axis_event*, float deviceScaleFactor);
    5056#endif
    5157
     
    5662#elif PLATFORM(IOS)
    5763    const void* nativeEvent() const { return 0; }
     64#elif PLATFORM(WPE)
     65    const void* nativeEvent() const { return nullptr; }
    5866#endif
    5967
  • trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp

    r216348 r216497  
    8585#include <WebCore/FloatQuad.h>
    8686#include <WebCore/InspectorOverlay.h>
    87 #include <WebCore/Pasteboard.h>
    8887#include <WebCore/SelectionRect.h>
    8988#include <WebCore/SharedBuffer.h>
    9089#endif // PLATFORM(IOS)
     90
     91#if PLATFORM(IOS) || PLATFORM(WPE)
     92#include <WebCore/Pasteboard.h>
     93#endif
    9194
    9295#if ENABLE(WIRELESS_PLAYBACK_TARGET)
     
    14921495
    14931496#endif
     1497
     1498#if PLATFORM(WPE)
     1499void ArgumentCoder<PasteboardWebContent>::encode(Encoder& encoder, const PasteboardWebContent& content)
     1500{
     1501    encoder << content.text;
     1502    encoder << content.markup;
     1503}
     1504
     1505bool ArgumentCoder<PasteboardWebContent>::decode(Decoder& decoder, PasteboardWebContent& content)
     1506{
     1507    if (!decoder.decode(content.text))
     1508        return false;
     1509    if (!decoder.decode(content.markup))
     1510        return false;
     1511    return true;
     1512}
     1513#endif // PLATFORM(WPE)
    14941514
    14951515void ArgumentCoder<DictationAlternative>::encode(Encoder& encoder, const DictationAlternative& dictationAlternative)
  • trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.h

    r215955 r216497  
    136136#endif
    137137
     138#if PLATFORM(WPE)
     139namespace WebCore {
     140struct PasteboardWebContents;
     141}
     142#endif
     143
    138144#if ENABLE(CONTENT_FILTERING)
    139145namespace WebCore {
     
    415421    static void encode(Encoder&, const WebCore::SoupNetworkProxySettings&);
    416422    static bool decode(Decoder&, WebCore::SoupNetworkProxySettings&);
     423};
     424#endif
     425
     426#if PLATFORM(WPE)
     427template<> struct ArgumentCoder<WebCore::PasteboardWebContent> {
     428    static void encode(Encoder&, const WebCore::PasteboardWebContent&);
     429    static bool decode(Decoder&, WebCore::PasteboardWebContent&);
    417430};
    418431#endif
  • trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h

    r215939 r216497  
    377377    \
    378378
    379 #elif PLATFORM(GTK)
     379#elif PLATFORM(GTK) || PLATFORM(WPE)
    380380
    381381#define FOR_EACH_WEBKIT_FONT_FAMILY_PREFERENCE(macro) \
  • trunk/Source/WebKit2/UIProcess/API/C/WKAPICast.h

    r216249 r216497  
    576576#endif
    577577
     578#if defined(BUILDING_WPE__)
     579#include "WKAPICastWPE.h"
     580#endif
     581
    578582#endif // WKAPICast_h
  • trunk/Source/WebKit2/UIProcess/ChildProcessProxy.cpp

    r215173 r216497  
    5656        launchOptions.extraInitializationData.add(ASCIILiteral("always-runs-at-background-priority"), "true");
    5757
    58 #if ENABLE(DEVELOPER_MODE) && PLATFORM(GTK)
     58#if ENABLE(DEVELOPER_MODE) && (PLATFORM(GTK) || PLATFORM(WPE))
    5959    const char* varname;
    6060    switch (launchOptions.processType) {
     
    8080    if (processCmdPrefix && *processCmdPrefix)
    8181        launchOptions.processCmdPrefix = String::fromUTF8(processCmdPrefix);
    82 #endif // ENABLE(DEVELOPER_MODE) && PLATFORM(GTK)
     82#endif // ENABLE(DEVELOPER_MODE) && (PLATFORM(GTK) || PLATFORM(WPE))
    8383}
    8484
  • trunk/Source/WebKit2/UIProcess/Launcher/ProcessLauncher.h

    r212557 r216497  
    6161        HashMap<String, String> extraInitializationData;
    6262
    63 #if ENABLE(DEVELOPER_MODE) && PLATFORM(GTK)
     63#if ENABLE(DEVELOPER_MODE) && (PLATFORM(GTK) || PLATFORM(WPE))
    6464        String processCmdPrefix;
    6565#endif
  • trunk/Source/WebKit2/UIProcess/WebInspectorProxy.h

    r212597 r216497  
    225225    WebPreferences& inspectorPagePreferences() const;
    226226
    227 #if PLATFORM(GTK)
     227#if PLATFORM(GTK) || PLATFORM(WPE)
    228228    void createInspectorWindow();
    229229    void updateInspectorWindowTitle() const;
  • trunk/Source/WebKit2/UIProcess/WebPasteboardProxy.h

    r215840 r216497  
    9999    void setPasteboardBufferForType(const String& pasteboardName, const String& pasteboardType, const SharedMemory::Handle&, uint64_t size, uint64_t& newChangeCount);
    100100#endif
     101
    101102#if PLATFORM(GTK)
    102103    void writeToClipboard(const String& pasteboardName, const WebSelectionData&);
     
    106107    WebFrameProxy* m_frameWritingToClipboard { nullptr };
    107108#endif // PLATFORM(GTK)
    108    
     109
     110#if PLATFORM(WPE)
     111    void getPasteboardTypes(Vector<String>& pasteboardTypes);
     112    void readStringFromPasteboard(uint64_t index, const String& pasteboardType, WTF::String&);
     113    void writeWebContentToPasteboard(const WebCore::PasteboardWebContent&);
     114    void writeStringToPasteboard(const String& pasteboardType, const String&);
     115#endif
     116
    109117    WebProcessProxyList m_webProcessProxyList;
    110118};
  • trunk/Source/WebKit2/UIProcess/WebPasteboardProxy.messages.in

    r215840 r216497  
    5959    ReadFromClipboard(String pasteboardName) -> (struct WebKit::WebSelectionData pasteboardContent)
    6060#endif
     61
     62#if PLATFORM(WPE)
     63    GetPasteboardTypes() -> (Vector<String> types)
     64    ReadStringFromPasteboard(uint64_t index, String pasteboardType) -> (String string)
     65    WriteWebContentToPasteboard(struct WebCore::PasteboardWebContent content)
     66    WriteStringToPasteboard(String pasteboardType, String text)
     67#endif
    6168}
  • trunk/Source/WebKit2/UIProcess/WebProcessPool.cpp

    r216234 r216497  
    286286}
    287287
    288 #if !PLATFORM(COCOA) && !PLATFORM(GTK)
     288#if !PLATFORM(COCOA) && !PLATFORM(GTK) && !PLATFORM(WPE)
    289289void WebProcessPool::platformInitialize()
    290290{
  • trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj

    r216445 r216497  
    95579557                        runOnlyForDeploymentPostprocessing = 0;
    95589558                        shellPath = /bin/sh;
    9559                         shellScript = "WKBASE_H=${TARGET_BUILD_DIR}/${PRIVATE_HEADERS_FOLDER_PATH}/WKBase.h\n\nunifdef -B -D__APPLE__ -UBUILDING_GTK__ -UUSE_SOUP -o \"${WKBASE_H}\".unifdef \"${WKBASE_H}\"\n\ncase $? in\n0)\n    rm \"${WKBASE_H}\".unifdef\n    ;;\n1)\n    mv \"${WKBASE_H}\"{.unifdef,}\n    ;;\n*)\n    exit 1\nesac\n";
     9559                        shellScript = "WKBASE_H=${TARGET_BUILD_DIR}/${PRIVATE_HEADERS_FOLDER_PATH}/WKBase.h\n\nunifdef -B -D__APPLE__ -UBUILDING_GTK__ -UBUILDING_WPE__ -UUSE_SOUP -o \"${WKBASE_H}\".unifdef \"${WKBASE_H}\"\n\ncase $? in\n0)\n    rm \"${WKBASE_H}\".unifdef\n    ;;\n1)\n    mv \"${WKBASE_H}\"{.unifdef,}\n    ;;\n*)\n    exit 1\nesac\n";
    95609560                };
    95619561                37E531011B2391090074F0DF /* Copy iOS Sandbox Profiles for Manual Sandboxing */ = {
  • trunk/Source/WebKit2/WebKit2Prefix.h

    r198792 r216497  
    5858#endif
    5959
    60 #if PLATFORM(GTK)
     60#if PLATFORM(GTK) || PLATFORM(WPE)
    6161#define ENABLE_SHAREABLE_RESOURCE 1
    6262#endif
  • trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.cpp

    r216448 r216497  
    298298}
    299299
    300 #if !PLATFORM(GTK) && !PLATFORM(COCOA)
     300#if !PLATFORM(GTK) && !PLATFORM(COCOA) && !PLATFORM(WPE)
    301301void WebEditorClient::handleKeyboardEvent(KeyboardEvent* event)
    302302{
  • trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp

    r215840 r216497  
    376376#endif // PLATFORM(GTK)
    377377
     378#if PLATFORM(WPE)
     379// PasteboardStrategy
     380
     381void WebPlatformStrategies::getTypes(Vector<String>& types)
     382{
     383    WebProcess::singleton().parentProcessConnection()->sendSync(Messages::WebPasteboardProxy::GetPasteboardTypes(), Messages::WebPasteboardProxy::GetPasteboardTypes::Reply(types), 0);
     384}
     385
     386String WebPlatformStrategies::readStringFromPasteboard(int index, const String& pasteboardType)
     387{
     388    String value;
     389    WebProcess::singleton().parentProcessConnection()->sendSync(Messages::WebPasteboardProxy::ReadStringFromPasteboard(index, pasteboardType), Messages::WebPasteboardProxy::ReadStringFromPasteboard::Reply(value), 0);
     390    return value;
     391}
     392
     393void WebPlatformStrategies::writeToPasteboard(const WebCore::PasteboardWebContent& content)
     394{
     395    WebProcess::singleton().parentProcessConnection()->send(Messages::WebPasteboardProxy::WriteWebContentToPasteboard(content), 0);
     396}
     397
     398void WebPlatformStrategies::writeToPasteboard(const String& pasteboardType, const String& text)
     399{
     400    WebProcess::singleton().parentProcessConnection()->send(Messages::WebPasteboardProxy::WriteStringToPasteboard(pasteboardType, text), 0);
     401}
     402
     403#endif // PLATFORM(WPE)
     404
    378405} // namespace WebKit
  • trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.h

    r215840 r216497  
    9494    Ref<WebCore::SelectionData> readFromClipboard(const String& pasteboardName) override;
    9595#endif
     96#if PLATFORM(WPE)
     97    void getTypes(Vector<String>& types) override;
     98    String readStringFromPasteboard(int index, const String& pasteboardType) override;
     99    void writeToPasteboard(const WebCore::PasteboardWebContent&) override;
     100    void writeToPasteboard(const String& pasteboardType, const String&) override;
     101#endif
    96102};
    97103
  • trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp

    r216101 r216497  
    7575        // Rendering to the actual screen will happen later anyway since the UI process schedules a redraw for every update,
    7676        // the compositor will take care of syncing to vblank.
    77         m_compositor = ThreadedCompositor::create(m_compositorClient, scaledSize, scaleFactor, m_surface->window(), ThreadedCompositor::ShouldDoFrameSync::Yes, paintFlags);
     77        m_compositor = ThreadedCompositor::create(m_compositorClient, webPage, scaledSize, scaleFactor, m_surface->window(), ThreadedCompositor::ShouldDoFrameSync::Yes, paintFlags);
    7878        m_layerTreeContext.contextID = m_surface->surfaceID();
    7979    } else
    80         m_compositor = ThreadedCompositor::create(m_compositorClient, scaledSize, scaleFactor);
     80        m_compositor = ThreadedCompositor::create(m_compositorClient, webPage, scaledSize, scaleFactor);
    8181
    8282    didChangeViewport();
  • trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.cpp

    r212608 r216497  
    3838#include "RemoteLayerTreeDrawingArea.h"
    3939#include "TiledCoreAnimationDrawingArea.h"
     40#elif PLATFORM(WPE)
     41#include "DrawingAreaWPE.h"
    4042#else
    4143#include "DrawingAreaImpl.h"
     
    5658    case DrawingAreaTypeRemoteLayerTree:
    5759        return std::make_unique<RemoteLayerTreeDrawingArea>(webPage, parameters);
     60#elif PLATFORM(WPE)
     61    case DrawingAreaTypeWPE:
     62        return std::make_unique<DrawingAreaWPE>(webPage, parameters);
    5863#else
    5964    case DrawingAreaTypeImpl:
  • trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp

    r216448 r216497  
    35143514}
    35153515
    3516 #if !PLATFORM(GTK) && !PLATFORM(COCOA)
     3516#if !PLATFORM(GTK) && !PLATFORM(COCOA) && !PLATFORM(WPE)
    35173517bool WebPage::handleEditingKeyboardEvent(KeyboardEvent* evt)
    35183518{
  • trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h

    r216348 r216497  
    10161016#endif
    10171017
    1018 #if !PLATFORM(COCOA)
     1018#if !PLATFORM(COCOA) && !PLATFORM(WPE)
    10191019    static const char* interpretKeyEvent(const WebCore::KeyboardEvent*);
    10201020#endif
  • trunk/Tools/BuildSlaveSupport/built-product-archive

    r215708 r216497  
    171171
    172172def archiveBuiltProduct(configuration, platform, fullPlatform):
    173     assert platform in ('mac', 'win', 'gtk', 'efl', 'ios')
     173    assert platform in ('mac', 'win', 'gtk', 'efl', 'ios', 'wpe')
    174174
    175175    if platform == 'ios':
     
    199199        shutil.rmtree(thinDirectory)
    200200
    201     elif platform == 'gtk' or platform == 'efl':
     201    elif platform == 'gtk' or platform == 'efl' or platform == 'wpe':
    202202        # On GTK+/EFL we don't need the intermediate step of creating a thinDirectory
    203203        # to be compressed in a ZIP file, because we can create the ZIP directly.
     
    233233
    234234def extractBuiltProduct(configuration, platform):
    235     assert platform in ('mac', 'win', 'gtk', 'efl', 'ios')
     235    assert platform in ('mac', 'win', 'gtk', 'efl', 'ios', 'wpe')
    236236
    237237    archiveFile = os.path.join(_topLevelBuildDirectory, configuration + '.zip')
     
    242242    if platform in ('mac', 'ios'):
    243243        return unzipArchive(_topLevelBuildDirectory, configuration)
    244     elif platform == 'win' or platform == 'gtk' or platform == 'efl':
     244    elif platform == 'win' or platform == 'gtk' or platform == 'efl' or platform == 'wpe':
    245245        print 'Extracting', _configurationBuildDirectory
    246246        return unzipArchive(_configurationBuildDirectory, configuration)
  • trunk/Tools/BuildSlaveSupport/test-result-archive

    r210358 r216497  
    4747
    4848def archiveTestResults(configuration, platform, layoutTestResultsDir):
    49     assert platform in ('mac', 'win', 'gtk', 'efl', 'wincairo', 'ios')
     49    assert platform in ('mac', 'win', 'gtk', 'efl', 'wincairo', 'ios', 'wpe')
    5050
    5151    try:
     
    6767        if subprocess.call(["ditto", "-c", "-k", "--sequesterRsrc", "--zlibCompressionLevel", "2", layoutTestResultsDir, archiveFile]):
    6868            return 1
    69     elif platform in ('win', 'gtk', 'efl', 'wincairo'):
     69    elif platform in ('win', 'gtk', 'efl', 'wincairo', 'wpe'):
    7070        if subprocess.call(["zip", "-r", "-2", archiveFile, "."], cwd=layoutTestResultsDir):
    7171            return 1
  • trunk/Tools/CMakeLists.txt

    r215758 r216497  
    2424        add_subdirectory(TestWebKitAPI)
    2525    endif ()
     26elseif ("${PORT}" STREQUAL "WPE")
     27    if (DEVELOPER_MODE)
     28        add_subdirectory(ImageDiff)
     29        add_subdirectory(WebKitTestRunner)
     30    endif ()
    2631endif ()
    2732
  • trunk/Tools/ChangeLog

    r216462 r216497  
     12017-05-09  Zan Dobersek  <zdobersek@igalia.com>
     2
     3        Upstream the WPE port
     4        https://bugs.webkit.org/show_bug.cgi?id=171110
     5
     6        Reviewed by Alex Christensen.
     7
     8        webkit-dev thread:
     9        https://lists.webkit.org/pipermail/webkit-dev/2017-April/028923.html
     10
     11        Add WPE support to various tooling scripts, TestWebKitAPI and WebKitTestRunner.
     12        In-file changes removed from this ChangeLog entry for brevity.
     13
     14        * BuildSlaveSupport/built-product-archive:
     15        * BuildSlaveSupport/test-result-archive:
     16        * CMakeLists.txt:
     17        * ImageDiff/PlatformWPE.cmake: Added.
     18        * Scripts/build-dumprendertree:
     19        * Scripts/build-webkit:
     20        * Scripts/build-webkittestrunner:
     21        * Scripts/update-webkit-libs-jhbuild:
     22        * Scripts/update-webkitwpe-libs: Added.
     23        * Scripts/webkitdirs.pm:
     24        * Scripts/webkitperl/FeatureList.pm:
     25        * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
     26        * Scripts/webkitpy/port/factory.py:
     27        * Scripts/webkitpy/port/wpe.py: Added.
     28        * TestWebKitAPI/PlatformWPE.cmake: Added.
     29        * TestWebKitAPI/wpe/InjectedBundleControllerWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
     30        * TestWebKitAPI/wpe/PlatformUtilitiesWPE.cpp: Added.
     31        * TestWebKitAPI/wpe/main.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
     32        * WebKitTestRunner/InjectedBundle/AccessibilityController.cpp:
     33        * WebKitTestRunner/InjectedBundle/AccessibilityController.h:
     34        * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
     35        * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
     36        * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
     37        * WebKitTestRunner/InjectedBundle/TestRunner.h:
     38        * WebKitTestRunner/InjectedBundle/wpe/AccessibilityControllerWPE.cpp: Added.
     39        * WebKitTestRunner/InjectedBundle/wpe/AccessibilityUIElementWPE.cpp: Added.
     40        * WebKitTestRunner/InjectedBundle/wpe/ActivateFontsWPE.cpp: Added.
     41        * WebKitTestRunner/InjectedBundle/wpe/InjectedBundleWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
     42        * WebKitTestRunner/InjectedBundle/wpe/TestRunnerWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
     43        * WebKitTestRunner/PlatformWPE.cmake: Added.
     44        * WebKitTestRunner/PlatformWebView.h:
     45        * WebKitTestRunner/TestController.cpp:
     46        * WebKitTestRunner/wpe/EventSenderProxyWPE.cpp: Added.
     47        * WebKitTestRunner/wpe/HeadlessViewBackend.cpp: Added.
     48        * WebKitTestRunner/wpe/HeadlessViewBackend.h: Copied from Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.h.
     49        * WebKitTestRunner/wpe/PlatformWebViewWPE.cpp: Added.
     50        * WebKitTestRunner/wpe/TestControllerWPE.cpp: Added.
     51        * WebKitTestRunner/wpe/main.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
     52        * jhbuild/jhbuild-wrapper:
     53        * wpe/generate-inspector-gresource-manifest.py: Added.
     54        * wpe/jhbuild.modules: Added.
     55        * wpe/jhbuildrc: Added.
     56        * wpe/patches/cairo-egl-device-create-for-egl-surface.patch: Added.
     57        * wpe/patches/fontconfig-C-11-requires-a-space-between-literal-and-identifier.patch: Added.
     58        * wpe/patches/freetype6-2.4.11-truetype-font-height-fix.patch: Added.
     59        * wpe/patches/gdate-suppress-string-format-literal-warning.patch: Added.
     60        * wpe/patches/glib-warning-fix.patch: Added.
     61        * wpe/patches/gst-plugins-bad-0001-dtls-port-to-OpenSSL-1.1.0.patch: Added.
     62        * wpe/patches/gst-plugins-bad-0002-dtlscertificate-Fix-error-checking-in-RSA_generate_k.patch: Added.
     63        * wpe/patches/gst-plugins-good-Revert-qtdemux-expose-streams-with-first-moof-for-fr.patch: Added.
     64        * wpe/patches/gst-plugins-good-use-the-tfdt-decode-time.patch: Added.
     65        * wpe/patches/gstreamer-typefind-Only-push-a-CAPS-event-downstream-if-the-.patch: Added.
     66
    1672017-05-08  Jonathan Bedard  <jbedard@apple.com>
    268
  • trunk/Tools/Scripts/build-dumprendertree

    r215758 r216497  
    6666if (isAppleCocoaWebKit()) {
    6767    $result = buildXCodeProject("DumpRenderTree", $clean, XcodeOptions(), @ARGV);
    68 } elsif (isGtk() || isAnyWindows()) {
    69     # GTK and Windows build everything in one shot. No need to build anything here.
     68} elsif (isGtk() || isWPE() || isAnyWindows()) {
     69    # GTK, WPE and Windows build everything in one shot. No need to build anything here.
    7070    $result = 0;
    7171} else {
  • trunk/Tools/Scripts/build-webkit

    r215758 r216497  
    101101
    102102  --gtk                             Build the GTK+ port
     103  --wpe                             Build the WPE port
    103104  --wincairo                        Build using Cairo (rather than CoreGraphics) on Windows
    104105
  • trunk/Tools/Scripts/build-webkittestrunner

    r215763 r216497  
    6262if (isAppleCocoaWebKit()) {
    6363    $result = buildXCodeProject("WebKitTestRunner", $clean, XcodeOptions(), @ARGV);
    64 } elsif (isGtk()) {
    65     # GTK+ build everything in one shot. No need to build anything here.
     64} elsif (isGtk() || isWPE()) {
     65    # GTK+ and WPE build everything in one shot. No need to build anything here.
    6666    $result = 0;
    6767} else {
  • trunk/Tools/Scripts/update-webkit-libs-jhbuild

    r215758 r216497  
    2525my $platform = "";
    2626$platform = "gtk" if isGtk();
     27$platform = "wpe" if isWPE();
    2728
    2829if (!$platform) {
    29     die "No platform specified for " . basename($0) .". Use --gtk.\n";
     30    die "No platform specified for " . basename($0) .". Use --gtk or --wpe.\n";
    3031}
    3132
     
    133134chdir(relativeScriptsDir() . "/../jhbuild") or die $!;
    134135
    135 my %prettyPlatform = ( "gtk" => "GTK+" );
     136my %prettyPlatform = ( "gtk" => "GTK+", "wpe" => "WPE" );
    136137
    137138if (!$force && !jhbuildConfigurationChanged()) {
  • trunk/Tools/Scripts/webkitdirs.pm

    r215758 r216497  
    108108    JSCOnly  => "JSCOnly",
    109109    WinCairo => "WinCairo",
     110    WPE      => "WPE",
    110111    Unknown  => "Unknown"
    111112};
     
    446447    push(@args, '--64-bit') if (isWin64());
    447448    push(@args, '--gtk') if isGtk();
     449    push(@args, '--wpe') if isWPE();
    448450    push(@args, '--jsc-only') if isJSCOnly();
    449451    push(@args, '--wincairo') if isWinCairo();
     
    681683
    682684    my $binaryDirectory;
    683     if (isGtk() || isJSCOnly()) {
     685    if (isGtk() || isJSCOnly() || isWPE()) {
    684686        $binaryDirectory = "bin";
    685687    } elsif (isAnyWindows()) {
     
    939941        }
    940942    }
     943    if (isWPE()) {
     944        return "$configurationProductDir/lib/libWPEWebKit.so";
     945    }
    941946
    942947    die "Unsupported platform, can't determine built library locations.\nTry `build-webkit --help` for more information.\n";
     
    10531058        gtk => GTK,
    10541059        'jsc-only' => JSCOnly,
    1055         wincairo => WinCairo
     1060        wincairo => WinCairo,
     1061        wpe => WPE
    10561062    );
    10571063
     
    10871093                --gtk
    10881094                --jsc-only
     1095                --wpe
    10891096            );
    10901097            die "Please specify which WebKit port to build using one of the following options:"
     
    11121119{
    11131120    return portName() eq JSCOnly;
     1121}
     1122
     1123sub isWPE()
     1124{
     1125    return portName() eq WPE;
    11141126}
    11151127
     
    15171529    } elsif (isAppleWebKit()) {
    15181530        return "$relativeScriptsPath/run-safari";
     1531    } elsif (isWPE()) {
     1532        return "$relativeScriptsPath/run-wpe";
    15191533    }
    15201534}
     
    15281542    } elsif (isAppleWinWebKit()) {
    15291543        return "MiniBrowser";
     1544    } elsif (isWPE()) {
     1545        return "WPELauncher";
    15301546    }
    15311547}
     
    18271843    if (isGtk()) {
    18281844        push(@jhbuildPath, "DependenciesGTK");
     1845    } elsif (isWPE()) {
     1846        push(@jhbuildPath, "DependenciesWPE");
    18291847    } else {
    18301848        die "Cannot get JHBuild path for platform that isn't GTK+.\n";
     
    18671885        if (isGtk()) {
    18681886            push(@prefix, "--gtk");
     1887        } elsif (isWPE()) {
     1888            push(@prefix, "--wpe");
    18691889        }
    18701890        push(@prefix, "run");
     
    20252045
    20262046    # Some ports have production mode, but build-webkit should always use developer mode.
    2027     push @args, "-DDEVELOPER_MODE=ON" if isGtk() || isJSCOnly();
     2047    push @args, "-DDEVELOPER_MODE=ON" if isGtk() || isJSCOnly() || isWPE();
    20282048
    20292049    # Don't warn variables which aren't used by cmake ports.
     
    21002120    if (isGtk() && checkForArgumentAndRemoveFromARGV("--update-gtk")) {
    21012121        system("perl", "$sourceDir/Tools/Scripts/update-webkitgtk-libs") == 0 or die $!;
     2122    }
     2123
     2124    if (isWPE() && checkForArgumentAndRemoveFromARGV("--update-wpe")) {
     2125        system("perl", "$sourceDir/Tools/Scripts/update-webkitwpe-libs") == 0 or die $!;
    21022126    }
    21032127
  • trunk/Tools/Scripts/webkitperl/FeatureList.pm

    r216234 r216497  
    148148my @features = (
    149149    { option => "3d-rendering", desc => "Toggle 3D Rendering support",
    150       define => "ENABLE_3D_TRANSFORMS", default => (isAppleCocoaWebKit() || isIOSWebKit() || isGtk()), value => \$threeDTransformsSupport },
     150      define => "ENABLE_3D_TRANSFORMS", default => (isAppleCocoaWebKit() || isIOSWebKit() || isGtk() || isWPE()), value => \$threeDTransformsSupport },
    151151
    152152    { option => "accelerated-2d-canvas", desc => "Toggle Accelerated 2D Canvas support",
    153       define => "ENABLE_ACCELERATED_2D_CANVAS", default => 0, value => \$accelerated2DCanvasSupport },
     153      define => "ENABLE_ACCELERATED_2D_CANVAS", default => isWPE(), value => \$accelerated2DCanvasSupport },
    154154
    155155    { option => "allinone-build", desc => "Toggle all-in-one build",
     
    184184
    185185    { option => "css-image-set", desc => "Toggle CSS image-set support",
    186       define => "ENABLE_CSS_IMAGE_SET", default => isGtk(), value => \$cssImageSetSupport },
     186      define => "ENABLE_CSS_IMAGE_SET", default => (isGtk() || isWPE()), value => \$cssImageSetSupport },
    187187
    188188    { option => "css-regions", desc => "Toggle CSS Regions support",
     
    208208
    209209    { option => "device-orientation", desc => "Toggle Device Orientation support",
    210       define => "ENABLE_DEVICE_ORIENTATION", default => isIOSWebKit(), value => \$deviceOrientationSupport },
     210      define => "ENABLE_DEVICE_ORIENTATION", default => (isIOSWebKit() || isWPE()), value => \$deviceOrientationSupport },
    211211
    212212    { option => "dom4-events-constructor", desc => "Expose DOM4 Events constructors",
     
    226226
    227227    { option => "ftl-jit", desc => "Toggle FTLJIT support",
    228       define => "ENABLE_FTL_JIT", default => (isX86_64() && (isGtk() || isJSCOnly())) , value => \$ftlJITSupport },
     228      define => "ENABLE_FTL_JIT", default => (isX86_64() && (isGtk() || isJSCOnly() || isWPE())) , value => \$ftlJITSupport },
    229229
    230230    { option => "ftpdir", desc => "Toggle FTP Directory support",
     
    238238
    239239    { option => "geolocation", desc => "Toggle Geolocation support",
    240       define => "ENABLE_GEOLOCATION", default => (isAppleWebKit() || isIOSWebKit() || isGtk()), value => \$geolocationSupport },
     240      define => "ENABLE_GEOLOCATION", default => (isAppleWebKit() || isIOSWebKit() || isGtk() || isWPE()), value => \$geolocationSupport },
    241241
    242242    { option => "high-dpi-canvas", desc => "Toggle High DPI Canvas support",
     
    247247
    248248    { option => "indexed-database", desc => "Toggle Indexed Database support",
    249       define => "ENABLE_INDEXED_DATABASE", default => (isAppleCocoaWebKit() || isGtk()), value => \$indexedDatabaseSupport },
     249      define => "ENABLE_INDEXED_DATABASE", default => (isAppleCocoaWebKit() || isGtk() || isWPE()), value => \$indexedDatabaseSupport },
    250250
    251251    { option => "input-speech", desc => "Toggle Input Speech support",
     
    313313
    314314    { option => "mhtml", desc => "Toggle MHTML support",
    315       define => "ENABLE_MHTML", default => isGtk(), value => \$mhtmlSupport },
     315      define => "ENABLE_MHTML", default => (isGtk() || isWPE()), value => \$mhtmlSupport },
    316316
    317317    { option => "mouse-cursor-scale", desc => "Toggle Scaled mouse cursor support",
     
    325325
    326326    { option => "netscape-plugin-api", desc => "Toggle Netscape Plugin API support",
    327       define => "ENABLE_NETSCAPE_PLUGIN_API", default => !isIOSWebKit(), value => \$netscapePluginAPISupport },
     327      define => "ENABLE_NETSCAPE_PLUGIN_API", default => (!isIOSWebKit() && !isWPE()), value => \$netscapePluginAPISupport },
    328328
    329329    { option => "nosniff", desc => "Toggle support for 'X-Content-Type-Options: nosniff'",
     
    337337
    338338    { option => "performance-timeline", desc => "Toggle Performance Timeline support",
    339       define => "ENABLE_PERFORMANCE_TIMELINE", default => isGtk(), value => \$performanceTimelineSupport },
     339      define => "ENABLE_PERFORMANCE_TIMELINE", default => (isGtk() || isWPE()), value => \$performanceTimelineSupport },
    340340
    341341    { option => "proximity-events", desc => "Toggle Proximity Events support",
     
    367367
    368368    { option => "touch-events", desc => "Toggle Touch Events support",
    369       define => "ENABLE_TOUCH_EVENTS", default => (isIOSWebKit() || isGtk()), value => \$touchEventsSupport },
     369      define => "ENABLE_TOUCH_EVENTS", default => (isIOSWebKit() || isGtk() || isWPE()), value => \$touchEventsSupport },
    370370
    371371    { option => "touch-icon-loading", desc => "Toggle Touch Icon Loading Support",
     
    379379
    380380    { option => "video", desc => "Toggle Video support",
    381       define => "ENABLE_VIDEO", default => (isAppleWebKit() || isGtk()), value => \$videoSupport },
     381      define => "ENABLE_VIDEO", default => (isAppleWebKit() || isGtk() || isWPE()), value => \$videoSupport },
    382382
    383383    { option => "video-track", desc => "Toggle Video Track support",
    384       define => "ENABLE_VIDEO_TRACK", default => (isAppleWebKit() || isGtk()), value => \$videoTrackSupport },
     384      define => "ENABLE_VIDEO_TRACK", default => (isAppleWebKit() || isGtk() || isWPE()), value => \$videoTrackSupport },
    385385
    386386    { option => "web-animations", desc => "Toggle Web Animations support",
     
    388388
    389389    { option => "web-audio", desc => "Toggle Web Audio support",
    390       define => "ENABLE_WEB_AUDIO", default => isGtk(), value => \$webAudioSupport },
     390      define => "ENABLE_WEB_AUDIO", default => (isGtk() || isWPE()), value => \$webAudioSupport },
    391391
    392392    { option => "web-replay", desc => "Toggle Web Replay support",
     
    403403
    404404    { option => "webassembly", desc => "Toggle WebAssembly support",
    405       define => "ENABLE_WEBASSEMBLY", default => (isX86_64() && (isGtk() || isJSCOnly())) , value => \$webAssemblySupport },
     405      define => "ENABLE_WEBASSEMBLY", default => (isX86_64() && (isGtk() || isJSCOnly() || isWPE())) , value => \$webAssemblySupport },
    406406
    407407    { option => "webgl", desc => "Toggle WebGL support",
    408       define => "ENABLE_WEBGL", default => (isAppleCocoaWebKit() || isGtk()), value => \$webglSupport },
     408      define => "ENABLE_WEBGL", default => (isAppleCocoaWebKit() || isGtk() || isWPE()), value => \$webglSupport },
    409409
    410410    { option => "writableStreamAPI", desc => "Toggle WritableStream API support",
  • trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py

    r216030 r216497  
    426426
    427427    # The GTK+ and EFL ports only support WebKit2 so they always use WKTR.
    428     if options.platform == "gtk" or options.platform == "efl":
     428    if options.platform in ["efl", "gtk", "wpe"]:
    429429        options.webkit_test_runner = True
    430430
  • trunk/Tools/Scripts/webkitpy/port/factory.py

    r215965 r216497  
    5454            const=('gtk*' if use_globs else 'gtk'),
    5555            help=('Alias for --platform=gtk*' if use_globs else 'Alias for --platform=gtk')),
     56        optparse.make_option('--wpe', action='store_const', dest='platform',
     57            const=('wpe*' if use_globs else 'wpe'),
     58            help=('Alias for --platform=wpe')),
    5659        optparse.make_option('--no-install', action='store_const',
    5760            const=False, default=True, dest='install',
     
    9497        'win.WinCairoPort',
    9598        'win.WinPort',
     99        'wpe.WPEPort',
    96100    )
    97101
  • trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityController.cpp

    r215758 r216497  
    7272}
    7373
    74 #if !PLATFORM(GTK)
     74#if !PLATFORM(GTK) && !PLATFORM(WPE)
    7575Ref<AccessibilityUIElement> AccessibilityController::rootElement()
    7676{
  • trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityController.h

    r215758 r216497  
    7474#if PLATFORM(COCOA)
    7575    RetainPtr<NotificationHandler> m_globalNotificationHandler;
    76 #else
     76#elif PLATFORM(GTK) || PLATFORM(EFL)
    7777    RefPtr<AccessibilityNotificationHandler> m_globalNotificationHandler;
    7878#endif
  • trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp

    r215758 r216497  
    7979   
    8080// Unsupported methods on various platforms. As they're implemented on other platforms this list should be modified.
    81 #if !PLATFORM(GTK) || !HAVE(ACCESSIBILITY)
     81#if (!PLATFORM(GTK) && !PLATFORM(WPE)) || !HAVE(ACCESSIBILITY)
    8282JSRetainPtr<JSStringRef> AccessibilityUIElement::characterAtOffset(int) { return nullptr; }
    8383JSRetainPtr<JSStringRef> AccessibilityUIElement::wordAtOffset(int) { return nullptr; }
  • trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h

    r215758 r216497  
    318318#endif
    319319
    320 #if PLATFORM(COCOA) || PLATFORM(GTK)
     320#if PLATFORM(COCOA) || PLATFORM(GTK) || PLATFORM(WPE)
    321321    void getChildren(Vector<RefPtr<AccessibilityUIElement> >&);
    322322    void getChildrenWithRange(Vector<RefPtr<AccessibilityUIElement> >&, unsigned location, unsigned length);
  • trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp

    r216219 r216497  
    9999    , m_userStyleSheetEnabled(false)
    100100    , m_userStyleSheetLocation(adoptWK(WKStringCreateWithUTF8CString("")))
    101 #if PLATFORM(GTK)
     101#if PLATFORM(GTK) || PLATFORM(WPE)
    102102    , m_waitToDumpWatchdogTimer(RunLoop::main(), this, &TestRunner::waitToDumpWatchdogTimerFired)
    103103#endif
  • trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h

    r216219 r216497  
    3939#include <CoreFoundation/CFRunLoop.h>
    4040typedef RetainPtr<CFRunLoopTimerRef> PlatformTimerRef;
    41 #elif PLATFORM(GTK)
     41#elif PLATFORM(GTK) || PLATFORM(WPE)
    4242#include <wtf/RunLoop.h>
    4343namespace WTR {
  • trunk/Tools/WebKitTestRunner/PlatformWebView.h

    r215758 r216497  
    5151typedef GtkWidget* PlatformWindow;
    5252typedef cairo_surface_t *PlatformImage;
     53#elif PLATFORM(WPE)
     54class HeadlessViewBackend;
     55typedef WKViewRef PlatformWKView;
     56typedef HeadlessViewBackend* PlatformWindow;
     57typedef cairo_surface_t* PlatformImage;
    5358#endif
    5459
  • trunk/Tools/WebKitTestRunner/TestController.cpp

    r216171 r216497  
    769769    resetPreferencesToConsistentValues(options);
    770770
    771 #if !PLATFORM(COCOA)
     771#if !PLATFORM(COCOA) && !PLATFORM(WPE)
    772772    WKTextCheckerContinuousSpellCheckingEnabledStateChanged(true);
    773773#endif
  • trunk/Tools/jhbuild/jhbuild-wrapper

    r209804 r216497  
    3232    if '--gtk' in sys.argv:
    3333        return "gtk";
     34    if '--wpe' in sys.argv:
     35        return "wpe"
    3436    raise ValueError('No platform specified for jhbuild-wrapper.')
    3537
Note: See TracChangeset for help on using the changeset viewer.