Changeset 216497 in webkit
- Timestamp:
- May 9, 2017, 4:07:57 AM (8 years ago)
- Location:
- trunk
- Files:
-
- 130 added
- 95 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/CMakeLists.txt
r211027 r216497 28 28 JSCOnly 29 29 Mac 30 WPE 30 31 WinCairo 31 32 ) -
trunk/ChangeLog
r216234 r216497 1 2017-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 1 17 2017-05-04 Commit Queue <commit-queue@webkit.org> 2 18 -
trunk/Source/JavaScriptCore/ChangeLog
r216481 r216497 1 2017-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 1 11 2017-05-09 Saam Barati <sbarati@apple.com> 2 12 -
trunk/Source/ThirdParty/ANGLE/ChangeLog
r216227 r216497 1 2017-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 1 11 2017-05-04 Don Olmstead <don.olmstead@am.sony.com> 2 12 -
trunk/Source/ThirdParty/ANGLE/include/EGL/eglplatform.h
r215490 r216497 100 100 typedef void* EGLNativeDisplayType; 101 101 102 #elif defined(USE_OZONE) 102 #elif defined(USE_OZONE) || defined(USE_WPE) 103 103 104 104 typedef intptr_t EGLNativeDisplayType; -
trunk/Source/WTF/ChangeLog
r216444 r216497 1 2017-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 1 12 2017-05-08 Mark Lam <mark.lam@apple.com> 2 13 -
trunk/Source/WTF/wtf/Platform.h
r216151 r216497 466 466 #if defined(BUILDING_GTK__) 467 467 #define WTF_PLATFORM_GTK 1 468 #elif defined(BUILDING_WPE__) 469 #define WTF_PLATFORM_WPE 1 468 470 #elif defined(BUILDING_JSCONLY__) 469 471 /* JSCOnly does not provide PLATFORM() macro */ … … 510 512 #endif 511 513 512 #if PLATFORM(GTK) 514 #if PLATFORM(GTK) || PLATFORM(WPE) 513 515 #define USE_CAIRO 1 514 516 #define USE_GLIB 1 … … 626 628 627 629 #if !defined(HAVE_ACCESSIBILITY) 628 #if PLATFORM(COCOA) || PLATFORM(WIN) || PLATFORM(GTK) 630 #if PLATFORM(COCOA) || PLATFORM(WIN) || PLATFORM(GTK) || PLATFORM(WPE) 629 631 #define HAVE_ACCESSIBILITY 1 630 632 #endif … … 777 779 #endif 778 780 /* 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)) 780 782 #define ENABLE_DFG_JIT 1 781 783 #endif … … 964 966 /* CSS Selector JIT Compiler */ 965 967 #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)) 967 969 #define ENABLE_CSS_SELECTOR_JIT 1 968 970 #else … … 1031 1033 #endif 1032 1034 1033 #if PLATFORM(GTK) 1035 #if PLATFORM(GTK) || PLATFORM(WPE) 1034 1036 #define USE_UNIX_DOMAIN_SOCKETS 1 1035 1037 #endif … … 1081 1083 #endif 1082 1084 1083 #if PLATFORM(COCOA) || PLATFORM(GTK) || (PLATFORM(WIN) && !USE(WINGDI))1085 #if PLATFORM(COCOA) || PLATFORM(GTK) || PLATFORM(WPE) || (PLATFORM(WIN) && !USE(WINGDI)) 1084 1086 #define USE_REQUEST_ANIMATION_FRAME_TIMER 1 1085 1087 #endif 1086 1088 1087 #if PLATFORM(COCOA) || PLATFORM(GTK) 1089 #if PLATFORM(COCOA) || PLATFORM(GTK) || PLATFORM(WPE) 1088 1090 #define USE_REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR 1 1089 1091 #endif … … 1148 1150 #endif 1149 1151 1150 #if PLATFORM(GTK) 1152 #if PLATFORM(GTK) || PLATFORM(WPE) 1151 1153 #undef ENABLE_OPENTYPE_VERTICAL 1152 1154 #define ENABLE_OPENTYPE_VERTICAL 1 -
trunk/Source/WTF/wtf/glib/RunLoopSourcePriority.h
r215455 r216497 23 23 24 24 namespace WTF { 25 26 #if PLATFORM(GTK) 25 27 26 28 // This is a global enum to define priorities used by GLib run loop sources. … … 81 83 }; 82 84 85 #elif PLATFORM(WPE) 86 87 enum 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 83 112 } // namespace WTF 84 113 -
trunk/Source/WebCore/CMakeLists.txt
r216477 r216497 4004 4004 PROPERTY COMPILE_DEFINITIONS 4005 4005 ANGLE_ENABLE_ESSL 4006 ANGLE_ENABLE_GLSL) 4006 ANGLE_ENABLE_GLSL 4007 ${ANGLE_PLATFORM_DEFINITIONS}) 4007 4008 4008 4009 target_include_directories(ANGLESupport PRIVATE -
trunk/Source/WebCore/ChangeLog
r216488 r216497 1 2017-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 1 71 2017-05-09 Frederic Wang <fwang@igalia.com> 2 72 -
trunk/Source/WebCore/PAL/ChangeLog
r216234 r216497 1 2017-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 1 10 2017-05-04 Commit Queue <commit-queue@webkit.org> 2 11 -
trunk/Source/WebCore/accessibility/AccessibilityObject.h
r216425 r216497 67 67 typedef struct _AtkObject AtkObject; 68 68 typedef struct _AtkObject AccessibilityObjectWrapper; 69 #elif PLATFORM(WPE) 70 class AccessibilityObjectWrapper : public RefCounted<AccessibilityObjectWrapper> { }; 69 71 #else 70 72 class AccessibilityObjectWrapper; … … 1153 1155 #elif PLATFORM(GTK) 1154 1156 AtkObject* m_wrapper; 1157 #elif PLATFORM(WPE) 1158 RefPtr<AccessibilityObjectWrapper> m_wrapper; 1155 1159 #endif 1156 1160 }; -
trunk/Source/WebCore/config.h
r216227 r216497 97 97 #endif 98 98 99 #if PLATFORM(MAC) 99 #if PLATFORM(MAC) || PLATFORM(WPE) 100 100 #define USE_NEW_THEME 1 101 101 #endif -
trunk/Source/WebCore/crypto/keys/CryptoKeyEC.h
r214825 r216497 37 37 #endif 38 38 39 #if PLATFORM(GTK) 39 #if PLATFORM(GTK) || PLATFORM(WPE) 40 40 // gcry_sexp* equates gcry_sexp_t. 41 41 struct gcry_sexp; -
trunk/Source/WebCore/crypto/keys/CryptoKeyRSA.h
r215085 r216497 37 37 #endif 38 38 39 #if PLATFORM(GTK) 39 #if PLATFORM(GTK) || PLATFORM(WPE) 40 40 // gcry_sexp* equates gcry_sexp_t. 41 41 struct gcry_sexp; -
trunk/Source/WebCore/editing/Editor.cpp
r216426 r216497 1246 1246 1247 1247 if (imageElement) { 1248 #if PLATFORM(COCOA) || PLATFORM(GTK) 1248 #if PLATFORM(COCOA) || PLATFORM(GTK) || PLATFORM(WPE) 1249 1249 writeImageToPasteboard(*Pasteboard::createForCopyAndPaste(), *imageElement, document().url(), document().title()); 1250 1250 #else … … 1252 1252 #endif 1253 1253 } else { 1254 #if PLATFORM(COCOA) || PLATFORM(GTK) 1254 #if PLATFORM(COCOA) || PLATFORM(GTK) || PLATFORM(WPE) 1255 1255 writeSelectionToPasteboard(*Pasteboard::createForCopyAndPaste()); 1256 1256 #else … … 1377 1377 url = result.absoluteImageURL(); 1378 1378 1379 #if PLATFORM(COCOA) || PLATFORM(GTK) 1379 #if PLATFORM(COCOA) || PLATFORM(GTK) || PLATFORM(WPE) 1380 1380 writeImageToPasteboard(*Pasteboard::createForCopyAndPaste(), *element, url, result.altDisplayString()); 1381 1381 #else -
trunk/Source/WebCore/editing/Editor.h
r216351 r216497 458 458 #endif 459 459 460 #if PLATFORM(COCOA) || PLATFORM(GTK) 460 #if PLATFORM(COCOA) || PLATFORM(GTK) || PLATFORM(WPE) 461 461 WEBCORE_EXPORT void writeSelectionToPasteboard(Pasteboard&); 462 462 WEBCORE_EXPORT void writeImageToPasteboard(Pasteboard&, Element& imageElement, const URL&, const String& title); -
trunk/Source/WebCore/page/EventHandler.cpp
r216212 r216497 2613 2613 } 2614 2614 2615 #if !PLATFORM(GTK) 2615 #if !PLATFORM(GTK) && !PLATFORM(WPE) 2616 2616 2617 2617 bool EventHandler::shouldTurnVerticalTicksIntoHorizontal(const HitTestResult&, const PlatformWheelEvent&) const -
trunk/Source/WebCore/platform/Cursor.h
r212484 r216497 75 75 #elif PLATFORM(GTK) 76 76 using PlatformCursor = GRefPtr<GdkCursor>; 77 #elif PLATFORM(WPE) 78 using PlatformCursor = void*; 77 79 #endif 78 80 -
trunk/Source/WebCore/platform/DragData.h
r215917 r216497 54 54 } 55 55 typedef WebCore::SelectionData* DragDataRef; 56 #elif PLATFORM(IOS) 56 #elif PLATFORM(IOS) || PLATFORM(WPE) 57 57 typedef void* DragDataRef; 58 58 #endif -
trunk/Source/WebCore/platform/DragImage.h
r216303 r216497 42 42 #elif PLATFORM(WIN) 43 43 typedef struct HBITMAP__* HBITMAP; 44 #elif PLATFORM(GTK)44 #elif USE(CAIRO) 45 45 #include "RefPtrCairo.h" 46 46 #endif … … 65 65 #elif PLATFORM(WIN) 66 66 typedef HBITMAP DragImageRef; 67 #elif PLATFORM(GTK) 67 #elif PLATFORM(GTK) || PLATFORM(WPE) 68 68 typedef RefPtr<cairo_surface_t> DragImageRef; 69 69 #endif -
trunk/Source/WebCore/platform/FileSystem.h
r215807 r216497 199 199 #endif 200 200 201 #if PLATFORM(GTK) 201 #if PLATFORM(GTK) || PLATFORM(WPE) 202 202 String filenameForDisplay(const String&); 203 203 CString applicationDirectoryPath(); -
trunk/Source/WebCore/platform/MainThreadSharedTimer.cpp
r194496 r216497 35 35 } 36 36 37 #if !PLATFORM(GTK) 37 #if !PLATFORM(GTK) && !PLATFORM(WPE) 38 38 MainThreadSharedTimer::MainThreadSharedTimer() 39 39 { -
trunk/Source/WebCore/platform/MainThreadSharedTimer.h
r208415 r216497 31 31 #include <wtf/NeverDestroyed.h> 32 32 33 #if PLATFORM(GTK) 33 #if PLATFORM(GTK) || PLATFORM(WPE) 34 34 #include <wtf/RunLoop.h> 35 35 #endif … … 55 55 56 56 std::function<void()> m_firedFunction; 57 #if PLATFORM(GTK) 57 #if PLATFORM(GTK) || PLATFORM(WPE) 58 58 RunLoop::Timer<MainThreadSharedTimer> m_timer; 59 59 #endif -
trunk/Source/WebCore/platform/Pasteboard.h
r215962 r216497 63 63 64 64 struct PasteboardWebContent { 65 #if !(PLATFORM(GTK) || PLATFORM(WIN) )65 #if !(PLATFORM(GTK) || PLATFORM(WIN) || PLATFORM(WPE)) 66 66 WEBCORE_EXPORT PasteboardWebContent(); 67 67 WEBCORE_EXPORT ~PasteboardWebContent(); … … 81 81 String markup; 82 82 #endif 83 #if PLATFORM(WPE) 84 String text; 85 String markup; 86 #endif 83 87 }; 84 88 -
trunk/Source/WebCore/platform/PasteboardStrategy.h
r215840 r216497 74 74 virtual long setStringForType(const String&, const String& pasteboardType, const String& pasteboardName) = 0; 75 75 #endif 76 76 77 #if PLATFORM(GTK) 77 78 virtual void writeToClipboard(const String& pasteboardName, const SelectionData&) = 0; 78 79 virtual Ref<SelectionData> readFromClipboard(const String& pasteboardName) = 0; 79 80 #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 80 89 protected: 81 90 virtual ~PasteboardStrategy() -
trunk/Source/WebCore/platform/PlatformPasteboard.h
r215840 r216497 41 41 #endif 42 42 43 #if PLATFORM(WPE) 44 struct wpe_pasteboard; 45 #endif 46 43 47 namespace WebCore { 44 48 … … 54 58 public: 55 59 WEBCORE_EXPORT explicit PlatformPasteboard(const String& pasteboardName); 56 #if PLATFORM(IOS) 60 #if PLATFORM(IOS) || PLATFORM(WPE) 57 61 WEBCORE_EXPORT PlatformPasteboard(); 58 62 WEBCORE_EXPORT Vector<String> filenamesForDataInteraction(); … … 111 115 GtkClipboard* m_clipboard; 112 116 #endif 117 #if PLATFORM(WPE) 118 struct wpe_pasteboard* m_pasteboard; 119 #endif 113 120 }; 114 121 -
trunk/Source/WebCore/platform/SchemeRegistry.cpp
r211946 r216497 60 60 secureSchemes.get().add("data"); 61 61 secureSchemes.get().add("wss"); 62 #if PLATFORM(GTK) 62 #if PLATFORM(GTK) || PLATFORM(WPE) 63 63 secureSchemes.get().add("resource"); 64 64 #endif -
trunk/Source/WebCore/platform/Widget.h
r216336 r216497 62 62 #endif 63 63 64 #if PLATFORM(WPE) 65 typedef void* PlatformWidget; 66 #endif 67 64 68 typedef PlatformWidget PlatformPageClient; 65 69 -
trunk/Source/WebCore/platform/audio/glib/AudioBusGLib.cpp
r193814 r216497 28 28 #include <wtf/glib/GUniquePtr.h> 29 29 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 30 36 namespace WebCore { 31 37 32 38 PassRefPtr<AudioBus> AudioBus::loadPlatformResource(const char* name, float sampleRate) 33 39 { 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)); 35 41 GRefPtr<GBytes> data = adoptGRef(g_resources_lookup_data(path.get(), G_RESOURCE_LOOKUP_FLAGS_NONE, nullptr)); 36 42 ASSERT(data); -
trunk/Source/WebCore/platform/glib/FileSystemGlib.cpp
r215922 r216497 214 214 return cachedPath; 215 215 216 #if PLATFORM(WPE) 217 GUniquePtr<gchar> dataPath(g_build_filename(DATA_DIR, "wpe", nullptr)); 218 #elif PLATFORM(GTK) 216 219 #if OS(WINDOWS) 217 220 HMODULE hmodule = 0; … … 222 225 #else 223 226 GUniquePtr<gchar> dataPath(g_build_filename(DATA_DIR, "webkitgtk-" WEBKITGTK_API_VERSION_STRING, NULL)); 227 #endif 224 228 #endif 225 229 -
trunk/Source/WebCore/platform/graphics/ANGLEWebKitBridge.h
r212484 r216497 37 37 #elif PLATFORM(WIN) 38 38 #include "OpenGLESShims.h" 39 #elif PLATFORM(GTK) 39 #elif PLATFORM(GTK) || PLATFORM(WPE) 40 40 #if USE(OPENGL_ES_2) 41 41 #include <GLES2/gl2.h> -
trunk/Source/WebCore/platform/graphics/GLContext.cpp
r215585 r216497 121 121 #endif 122 122 123 #if USE(EGL) || PLATFORM(WAYLAND) 123 #if USE(EGL) || PLATFORM(WAYLAND) || PLATFORM(WPE) 124 124 if (auto eglContext = GLContextEGL::createSharingContext(display)) 125 125 return WTFMove(eglContext); -
trunk/Source/WebCore/platform/graphics/GLContext.h
r208997 r216497 26 26 27 27 #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 28 34 #include "eglplatform.h" 35 #endif 29 36 typedef EGLNativeWindowType GLNativeWindowType; 30 37 #else -
trunk/Source/WebCore/platform/graphics/GraphicsContext3D.h
r214162 r216497 61 61 OBJC_CLASS CALayer; 62 62 OBJC_CLASS WebGLLayer; 63 #elif PLATFORM(GTK) || PLATFORM(WIN_CAIRO) 63 #elif PLATFORM(GTK) || PLATFORM(WIN_CAIRO) || PLATFORM(WPE) 64 64 typedef unsigned int GLuint; 65 65 #endif … … 1374 1374 std::unique_ptr<ShaderNameHash> nameHashMapForShaders; 1375 1375 1376 #if ((PLATFORM(GTK) || PLATFORM(WIN) ) && USE(OPENGL_ES_2))1376 #if ((PLATFORM(GTK) || PLATFORM(WIN) || PLATFORM(WPE)) && USE(OPENGL_ES_2)) 1377 1377 friend class Extensions3DOpenGLES; 1378 1378 std::unique_ptr<Extensions3DOpenGLES> m_extensions; -
trunk/Source/WebCore/platform/graphics/OpenGLESShims.h
r212521 r216497 27 27 #define OpenGLESShims_h 28 28 29 #if PLATFORM(GTK) || PLATFORM(WIN) 29 #if PLATFORM(GTK) || PLATFORM(WIN) || PLATFORM(WPE) 30 30 #define glBindFramebufferEXT glBindFramebuffer 31 31 #define glFramebufferTexture2DEXT glFramebufferTexture2D … … 46 46 #define glGenerateMipmapEXT glGenerateMipmap 47 47 #define GL_DEPTH_ATTACHMENT_EXT GL_DEPTH_ATTACHMENT 48 #define GL_COLOR_ATTACHMENT0_EXT GL_COLOR_ATTACHMENT0 48 49 #define GL_FRAMEBUFFER_COMPLETE_EXT GL_FRAMEBUFFER_COMPLETE 49 50 #define GL_FRAMEBUFFER_EXT GL_FRAMEBUFFER -
trunk/Source/WebCore/platform/graphics/PlatformDisplay.cpp
r215585 r216497 43 43 #endif 44 44 45 #if PLATFORM(WPE) 46 #include "PlatformDisplayWPE.h" 47 #endif 48 45 49 #if PLATFORM(GTK) 46 50 #include <gdk/gdk.h> … … 99 103 #if PLATFORM(X11) 100 104 return std::make_unique<PlatformDisplayX11>(nullptr); 105 #endif 106 107 #if PLATFORM(WPE) 108 return std::make_unique<PlatformDisplayWPE>(); 101 109 #endif 102 110 -
trunk/Source/WebCore/platform/graphics/PlatformDisplay.h
r214688 r216497 55 55 Windows, 56 56 #endif 57 #if PLATFORM(WPE) 58 WPE, 59 #endif 57 60 }; 58 61 -
trunk/Source/WebCore/platform/graphics/egl/GLContextEGL.cpp
r215585 r216497 205 205 return nullptr; 206 206 207 #if PLATFORM(WPE) 208 if (platformDisplay.type() == PlatformDisplay::Type::WPE) { 209 if (auto context = createWPEContext(platformDisplay)) 210 return context; 211 } 212 #endif 213 207 214 auto context = createSurfacelessContext(platformDisplay); 208 215 if (!context) { … … 252 259 destroyWaylandWindow(); 253 260 #endif 261 #if PLATFORM(WPE) 262 destroyWPETarget(); 263 #endif 254 264 } 255 265 -
trunk/Source/WebCore/platform/graphics/egl/GLContextEGL.h
r207615 r216497 31 31 #include "WlUniquePtr.h" 32 32 struct wl_egl_window; 33 #endif 34 35 #if PLATFORM(WPE) 36 #include "PlatformDisplayWPE.h" 33 37 #endif 34 38 … … 74 78 void destroyWaylandWindow(); 75 79 #endif 80 #if PLATFORM(WPE) 81 void destroyWPETarget(); 82 #endif 76 83 77 84 static std::unique_ptr<GLContextEGL> createWindowContext(GLNativeWindowType, PlatformDisplay&, EGLContext sharingContext = nullptr); … … 85 92 static std::unique_ptr<GLContextEGL> createWaylandContext(PlatformDisplay&, EGLContext sharingContext = nullptr); 86 93 static EGLSurface createWindowSurfaceWayland(EGLDisplay, EGLConfig, GLNativeWindowType); 94 #endif 95 #if PLATFORM(WPE) 96 static std::unique_ptr<GLContextEGL> createWPEContext(PlatformDisplay&, EGLContext sharingContext = nullptr); 87 97 #endif 88 98 … … 99 109 struct wl_egl_window* m_wlWindow { nullptr }; 100 110 #endif 111 #if PLATFORM(WPE) 112 std::unique_ptr<PlatformDisplayWPE::EGLOffscreenTarget> m_wpeTarget; 113 #endif 101 114 #if USE(CAIRO) 102 115 cairo_device_t* m_cairoDevice { nullptr }; -
trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp
r215922 r216497 60 60 61 61 #if USE(EGL) 62 #if !PLATFORM(WPE) 62 63 #include "GLContextEGL.h" 64 #endif 63 65 #include <gst/gl/egl/gstgldisplay_egl.h> 64 66 #endif … … 70 72 #if PLATFORM(WAYLAND) 71 73 #include "PlatformDisplayWayland.h" 74 #elif PLATFORM(WPE) 75 #include "PlatformDisplayWPE.h" 72 76 #endif 73 77 … … 437 441 if (is<PlatformDisplayWayland>(sharedDisplay)) 438 442 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())); 439 448 #endif 440 449 -
trunk/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp
r215490 r216497 399 399 400 400 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)) 402 402 GC3Dint maxVaryingFloats = 0; 403 403 ::glGetIntegerv(GL_MAX_VARYING_FLOATS, &maxVaryingFloats); -
trunk/Source/WebKit2/ChangeLog
r216483 r216497 1 2017-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 1 93 2017-05-09 Carlos Garcia Campos <cgarcia@igalia.com> 2 94 -
trunk/Source/WebKit2/Platform/IPC/glib/GSocketMonitor.cpp
r213030 r216497 52 52 m_callback = WTFMove(callback); 53 53 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 54 57 g_source_attach(m_source.get(), runLoop.mainContext()); 55 58 } -
trunk/Source/WebKit2/Scripts/generate-forwarding-headers.pl
r205012 r216497 36 36 37 37 my $srcRoot = realpath(File::Spec->catfile(dirname(abs_path($0)), "../..")); 38 my @platformPrefixes = ("ca", "cf", "cocoa", "Cocoa", "CoordinatedGraphics", "curl", "efl", "gtk", "ios", "mac", "soup", "win" );38 my @platformPrefixes = ("ca", "cf", "cocoa", "Cocoa", "CoordinatedGraphics", "curl", "efl", "gtk", "ios", "mac", "soup", "win", "wpe"); 39 39 my @frameworks = ("JavaScriptCore", "WebCore", "WebKit"); 40 40 my @skippedPrefixes; -
trunk/Source/WebKit2/Shared/API/c/WKBase.h
r212557 r216497 37 37 #if defined(__APPLE__) && !defined(BUILDING_GTK__) 38 38 #include <WebKit/WKBaseMac.h> 39 #endif 40 41 #if defined(BUILDING_WPE__) 42 #include <WebKit/WKBaseWPE.h> 39 43 #endif 40 44 -
trunk/Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.cpp
r215259 r216497 76 76 WorkQueuePool() 77 77 { 78 #if PLATFORM(GTK) 78 // FIXME: This is a sane default limit, but it should be configurable somehow. 79 79 m_threadCountLimit = 1; 80 #else81 m_threadCountLimit = std::numeric_limits<unsigned>::max();82 #endif83 80 } 84 81 -
trunk/Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.h
r215260 r216497 29 29 #if USE(COORDINATED_GRAPHICS_THREADED) 30 30 31 #include <functional> 31 32 #include <wtf/Atomics.h> 32 33 #include <wtf/Condition.h> -
trunk/Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp
r216182 r216497 45 45 namespace WebKit { 46 46 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)47 Ref<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 52 ThreadedCompositor::ThreadedCompositor(Client& client, WebPage& webPage, const IntSize& viewportSize, float scaleFactor, uint64_t nativeSurfaceHandle, ShouldDoFrameSync doFrameSync, TextureMapper::PaintFlags paintFlags) 53 53 : m_client(client) 54 54 , m_viewportSize(viewportSize) … … 66 66 m_coordinateUpdateCompletionWithClient.store(false); 67 67 68 #if PLATFORM(WPE) 69 m_compositingManager.establishConnection(webPage); 70 #endif 71 68 72 m_compositingRunLoop->performTaskSync([this, protectedThis = makeRef(*this)] { 69 73 m_scene = adoptRef(new CoordinatedGraphicsScene(this)); 74 #if PLATFORM(GTK) 70 75 if (m_nativeSurfaceHandle) { 71 76 createGLContext(); … … 73 78 } else 74 79 m_scene->setActive(false); 80 #elif PLATFORM(WPE) 81 m_scene->setActive(true); 82 #endif 75 83 }); 76 84 } … … 83 91 { 84 92 ASSERT(!isMainThread()); 93 94 #if PLATFORM(GTK) 85 95 ASSERT(m_nativeSurfaceHandle); 86 96 … … 93 103 m_context->swapInterval(0); 94 104 } 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 95 121 } 96 122 … … 102 128 m_scene->purgeGLResources(); 103 129 m_context = nullptr; 130 #if PLATFORM(WPE) 131 m_target = nullptr; 132 #endif 104 133 m_scene = nullptr; 105 134 }); … … 108 137 #endif 109 138 m_compositingRunLoop = nullptr; 139 #if USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR) 140 m_displayRefreshMonitor->invalidate(); 141 #endif 110 142 } 111 143 112 144 void ThreadedCompositor::setNativeSurfaceHandleForCompositing(uint64_t handle) 113 145 { 146 #if PLATFORM(GTK) 114 147 m_compositingRunLoop->stopUpdates(); 115 148 m_compositingRunLoop->performTaskSync([this, protectedThis = makeRef(*this), handle] { … … 125 158 } 126 159 }); 160 #endif 127 161 } 128 162 … … 148 182 m_compositingRunLoop->performTaskSync([this, protectedThis = makeRef(*this), viewportSize, scale] { 149 183 m_viewportSize = viewportSize; 184 #if PLATFORM(WPE) 185 if (m_target) 186 m_target->resize(viewportSize); 187 #endif 150 188 m_scaleFactor = scale; 151 189 m_needsResize = true; … … 192 230 return; 193 231 232 #if PLATFORM(WPE) 233 if (!m_context) 234 createGLContext(); 235 #endif 236 194 237 if (!m_context || !m_context->makeContextCurrent()) 195 238 return; 239 240 #if PLATFORM(WPE) 241 m_target->frameWillRender(); 242 #endif 196 243 197 244 if (m_needsResize) { … … 214 261 m_context->swapBuffers(); 215 262 263 #if PLATFORM(WPE) 264 m_target->frameRendered(); 265 #endif 266 267 #if PLATFORM(GTK) 216 268 sceneUpdateFinished(); 269 #endif 217 270 } 218 271 … … 281 334 #endif 282 335 336 #if PLATFORM(WPE) 337 void ThreadedCompositor::frameComplete() 338 { 339 ASSERT(m_compositingRunLoop->isCurrent()); 340 sceneUpdateFinished(); 341 } 342 #endif 343 283 344 } 284 345 #endif // USE(COORDINATED_GRAPHICS_THREADED) -
trunk/Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h
r216182 r216497 43 43 #endif 44 44 45 #if PLATFORM(WPE) 46 #include "CompositingManager.h" 47 #include <WebCore/PlatformDisplayWPE.h> 48 #endif 49 45 50 namespace WebCore { 46 51 struct CoordinatedGraphicsState; … … 52 57 class CoordinatedGraphicsSceneClient; 53 58 class ThreadedDisplayRefreshMonitor; 59 class WebPage; 54 60 55 class ThreadedCompositor : public CoordinatedGraphicsSceneClient, public ThreadSafeRefCounted<ThreadedCompositor> { 61 class ThreadedCompositor : public CoordinatedGraphicsSceneClient, public ThreadSafeRefCounted<ThreadedCompositor> 62 #if PLATFORM(WPE) 63 , public WebCore::PlatformDisplayWPE::EGLTarget::Client 64 #endif 65 { 56 66 WTF_MAKE_NONCOPYABLE(ThreadedCompositor); 57 67 WTF_MAKE_FAST_ALLOCATED; … … 65 75 enum class ShouldDoFrameSync { No, Yes }; 66 76 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); 68 78 virtual ~ThreadedCompositor(); 69 79 … … 89 99 90 100 private: 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); 92 102 93 103 // CoordinatedGraphicsSceneClient … … 95 105 void updateViewport() override; 96 106 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 97 112 98 113 void renderLayerTree(); … … 103 118 Client& m_client; 104 119 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 105 126 std::unique_ptr<WebCore::GLContext> m_context; 106 127 -
trunk/Source/WebKit2/Shared/DrawingAreaInfo.h
r212608 r216497 35 35 #endif 36 36 DrawingAreaTypeRemoteLayerTree, 37 #elif PLATFORM(WPE) 38 DrawingAreaTypeWPE 37 39 #else 38 40 DrawingAreaTypeImpl -
trunk/Source/WebKit2/Shared/NativeWebKeyboardEvent.h
r212557 r216497 52 52 #endif 53 53 54 #if PLATFORM(WPE) 55 struct wpe_input_keyboard_event; 56 #endif 57 54 58 namespace WebKit { 55 59 … … 63 67 #elif PLATFORM(IOS) 64 68 NativeWebKeyboardEvent(::WebEvent *); 69 #elif PLATFORM(WPE) 70 NativeWebKeyboardEvent(struct wpe_input_keyboard_event*); 65 71 #endif 66 72 … … 73 79 #elif PLATFORM(IOS) 74 80 ::WebEvent* nativeEvent() const { return m_nativeEvent.get(); } 81 #elif PLATFORM(WPE) 82 const void* nativeEvent() const { return nullptr; } 75 83 #endif 76 84 -
trunk/Source/WebKit2/Shared/NativeWebMouseEvent.h
r212557 r216497 39 39 #endif 40 40 41 #if PLATFORM(WPE) 42 struct wpe_input_pointer_event; 43 #endif 44 41 45 namespace WebKit { 42 46 … … 48 52 NativeWebMouseEvent(const NativeWebMouseEvent&); 49 53 NativeWebMouseEvent(GdkEvent*, int); 54 #elif PLATFORM(WPE) 55 NativeWebMouseEvent(struct wpe_input_pointer_event*, float deviceScaleFactor); 50 56 #endif 51 57 … … 56 62 #elif PLATFORM(IOS) 57 63 const void* nativeEvent() const { return 0; } 64 #elif PLATFORM(WPE) 65 const void* nativeEvent() const { return nullptr; } 58 66 #endif 59 67 -
trunk/Source/WebKit2/Shared/NativeWebTouchEvent.h
r212557 r216497 35 35 #elif PLATFORM(GTK) 36 36 #include <WebCore/GUniquePtrGtk.h> 37 #elif PLATFORM(WPE) 38 #include <wpe/input.h> 37 39 #endif 38 40 … … 47 49 NativeWebTouchEvent(const NativeWebTouchEvent&); 48 50 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; } 49 54 #endif 50 55 … … 56 61 #if PLATFORM(GTK) 57 62 GUniquePtr<GdkEvent> m_nativeEvent; 63 #elif PLATFORM(WPE) 64 struct wpe_input_touch_event_raw m_fallbackTouchPoint; 58 65 #endif 59 66 }; -
trunk/Source/WebKit2/Shared/NativeWebWheelEvent.h
r212557 r216497 39 39 #endif 40 40 41 #if PLATFORM(WPE) 42 struct wpe_input_axis_event; 43 #endif 44 41 45 namespace WebKit { 42 46 … … 48 52 NativeWebWheelEvent(const NativeWebWheelEvent&); 49 53 NativeWebWheelEvent(GdkEvent*); 54 #elif PLATFORM(WPE) 55 NativeWebWheelEvent(struct wpe_input_axis_event*, float deviceScaleFactor); 50 56 #endif 51 57 … … 56 62 #elif PLATFORM(IOS) 57 63 const void* nativeEvent() const { return 0; } 64 #elif PLATFORM(WPE) 65 const void* nativeEvent() const { return nullptr; } 58 66 #endif 59 67 -
trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp
r216348 r216497 85 85 #include <WebCore/FloatQuad.h> 86 86 #include <WebCore/InspectorOverlay.h> 87 #include <WebCore/Pasteboard.h>88 87 #include <WebCore/SelectionRect.h> 89 88 #include <WebCore/SharedBuffer.h> 90 89 #endif // PLATFORM(IOS) 90 91 #if PLATFORM(IOS) || PLATFORM(WPE) 92 #include <WebCore/Pasteboard.h> 93 #endif 91 94 92 95 #if ENABLE(WIRELESS_PLAYBACK_TARGET) … … 1492 1495 1493 1496 #endif 1497 1498 #if PLATFORM(WPE) 1499 void ArgumentCoder<PasteboardWebContent>::encode(Encoder& encoder, const PasteboardWebContent& content) 1500 { 1501 encoder << content.text; 1502 encoder << content.markup; 1503 } 1504 1505 bool 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) 1494 1514 1495 1515 void ArgumentCoder<DictationAlternative>::encode(Encoder& encoder, const DictationAlternative& dictationAlternative) -
trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.h
r215955 r216497 136 136 #endif 137 137 138 #if PLATFORM(WPE) 139 namespace WebCore { 140 struct PasteboardWebContents; 141 } 142 #endif 143 138 144 #if ENABLE(CONTENT_FILTERING) 139 145 namespace WebCore { … … 415 421 static void encode(Encoder&, const WebCore::SoupNetworkProxySettings&); 416 422 static bool decode(Decoder&, WebCore::SoupNetworkProxySettings&); 423 }; 424 #endif 425 426 #if PLATFORM(WPE) 427 template<> struct ArgumentCoder<WebCore::PasteboardWebContent> { 428 static void encode(Encoder&, const WebCore::PasteboardWebContent&); 429 static bool decode(Decoder&, WebCore::PasteboardWebContent&); 417 430 }; 418 431 #endif -
trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h
r215939 r216497 377 377 \ 378 378 379 #elif PLATFORM(GTK) 379 #elif PLATFORM(GTK) || PLATFORM(WPE) 380 380 381 381 #define FOR_EACH_WEBKIT_FONT_FAMILY_PREFERENCE(macro) \ -
trunk/Source/WebKit2/UIProcess/API/C/WKAPICast.h
r216249 r216497 576 576 #endif 577 577 578 #if defined(BUILDING_WPE__) 579 #include "WKAPICastWPE.h" 580 #endif 581 578 582 #endif // WKAPICast_h -
trunk/Source/WebKit2/UIProcess/ChildProcessProxy.cpp
r215173 r216497 56 56 launchOptions.extraInitializationData.add(ASCIILiteral("always-runs-at-background-priority"), "true"); 57 57 58 #if ENABLE(DEVELOPER_MODE) && PLATFORM(GTK)58 #if ENABLE(DEVELOPER_MODE) && (PLATFORM(GTK) || PLATFORM(WPE)) 59 59 const char* varname; 60 60 switch (launchOptions.processType) { … … 80 80 if (processCmdPrefix && *processCmdPrefix) 81 81 launchOptions.processCmdPrefix = String::fromUTF8(processCmdPrefix); 82 #endif // ENABLE(DEVELOPER_MODE) && PLATFORM(GTK)82 #endif // ENABLE(DEVELOPER_MODE) && (PLATFORM(GTK) || PLATFORM(WPE)) 83 83 } 84 84 -
trunk/Source/WebKit2/UIProcess/Launcher/ProcessLauncher.h
r212557 r216497 61 61 HashMap<String, String> extraInitializationData; 62 62 63 #if ENABLE(DEVELOPER_MODE) && PLATFORM(GTK)63 #if ENABLE(DEVELOPER_MODE) && (PLATFORM(GTK) || PLATFORM(WPE)) 64 64 String processCmdPrefix; 65 65 #endif -
trunk/Source/WebKit2/UIProcess/WebInspectorProxy.h
r212597 r216497 225 225 WebPreferences& inspectorPagePreferences() const; 226 226 227 #if PLATFORM(GTK) 227 #if PLATFORM(GTK) || PLATFORM(WPE) 228 228 void createInspectorWindow(); 229 229 void updateInspectorWindowTitle() const; -
trunk/Source/WebKit2/UIProcess/WebPasteboardProxy.h
r215840 r216497 99 99 void setPasteboardBufferForType(const String& pasteboardName, const String& pasteboardType, const SharedMemory::Handle&, uint64_t size, uint64_t& newChangeCount); 100 100 #endif 101 101 102 #if PLATFORM(GTK) 102 103 void writeToClipboard(const String& pasteboardName, const WebSelectionData&); … … 106 107 WebFrameProxy* m_frameWritingToClipboard { nullptr }; 107 108 #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 109 117 WebProcessProxyList m_webProcessProxyList; 110 118 }; -
trunk/Source/WebKit2/UIProcess/WebPasteboardProxy.messages.in
r215840 r216497 59 59 ReadFromClipboard(String pasteboardName) -> (struct WebKit::WebSelectionData pasteboardContent) 60 60 #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 61 68 } -
trunk/Source/WebKit2/UIProcess/WebProcessPool.cpp
r216234 r216497 286 286 } 287 287 288 #if !PLATFORM(COCOA) && !PLATFORM(GTK) 288 #if !PLATFORM(COCOA) && !PLATFORM(GTK) && !PLATFORM(WPE) 289 289 void WebProcessPool::platformInitialize() 290 290 { -
trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj
r216445 r216497 9557 9557 runOnlyForDeploymentPostprocessing = 0; 9558 9558 shellPath = /bin/sh; 9559 shellScript = "WKBASE_H=${TARGET_BUILD_DIR}/${PRIVATE_HEADERS_FOLDER_PATH}/WKBase.h\n\nunifdef -B -D__APPLE__ -UBUILDING_GTK__ -U USE_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"; 9560 9560 }; 9561 9561 37E531011B2391090074F0DF /* Copy iOS Sandbox Profiles for Manual Sandboxing */ = { -
trunk/Source/WebKit2/WebKit2Prefix.h
r198792 r216497 58 58 #endif 59 59 60 #if PLATFORM(GTK) 60 #if PLATFORM(GTK) || PLATFORM(WPE) 61 61 #define ENABLE_SHAREABLE_RESOURCE 1 62 62 #endif -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.cpp
r216448 r216497 298 298 } 299 299 300 #if !PLATFORM(GTK) && !PLATFORM(COCOA) 300 #if !PLATFORM(GTK) && !PLATFORM(COCOA) && !PLATFORM(WPE) 301 301 void WebEditorClient::handleKeyboardEvent(KeyboardEvent* event) 302 302 { -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp
r215840 r216497 376 376 #endif // PLATFORM(GTK) 377 377 378 #if PLATFORM(WPE) 379 // PasteboardStrategy 380 381 void WebPlatformStrategies::getTypes(Vector<String>& types) 382 { 383 WebProcess::singleton().parentProcessConnection()->sendSync(Messages::WebPasteboardProxy::GetPasteboardTypes(), Messages::WebPasteboardProxy::GetPasteboardTypes::Reply(types), 0); 384 } 385 386 String 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 393 void WebPlatformStrategies::writeToPasteboard(const WebCore::PasteboardWebContent& content) 394 { 395 WebProcess::singleton().parentProcessConnection()->send(Messages::WebPasteboardProxy::WriteWebContentToPasteboard(content), 0); 396 } 397 398 void 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 378 405 } // namespace WebKit -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.h
r215840 r216497 94 94 Ref<WebCore::SelectionData> readFromClipboard(const String& pasteboardName) override; 95 95 #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 96 102 }; 97 103 -
trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp
r216101 r216497 75 75 // Rendering to the actual screen will happen later anyway since the UI process schedules a redraw for every update, 76 76 // 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); 78 78 m_layerTreeContext.contextID = m_surface->surfaceID(); 79 79 } else 80 m_compositor = ThreadedCompositor::create(m_compositorClient, scaledSize, scaleFactor);80 m_compositor = ThreadedCompositor::create(m_compositorClient, webPage, scaledSize, scaleFactor); 81 81 82 82 didChangeViewport(); -
trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.cpp
r212608 r216497 38 38 #include "RemoteLayerTreeDrawingArea.h" 39 39 #include "TiledCoreAnimationDrawingArea.h" 40 #elif PLATFORM(WPE) 41 #include "DrawingAreaWPE.h" 40 42 #else 41 43 #include "DrawingAreaImpl.h" … … 56 58 case DrawingAreaTypeRemoteLayerTree: 57 59 return std::make_unique<RemoteLayerTreeDrawingArea>(webPage, parameters); 60 #elif PLATFORM(WPE) 61 case DrawingAreaTypeWPE: 62 return std::make_unique<DrawingAreaWPE>(webPage, parameters); 58 63 #else 59 64 case DrawingAreaTypeImpl: -
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
r216448 r216497 3514 3514 } 3515 3515 3516 #if !PLATFORM(GTK) && !PLATFORM(COCOA) 3516 #if !PLATFORM(GTK) && !PLATFORM(COCOA) && !PLATFORM(WPE) 3517 3517 bool WebPage::handleEditingKeyboardEvent(KeyboardEvent* evt) 3518 3518 { -
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h
r216348 r216497 1016 1016 #endif 1017 1017 1018 #if !PLATFORM(COCOA) 1018 #if !PLATFORM(COCOA) && !PLATFORM(WPE) 1019 1019 static const char* interpretKeyEvent(const WebCore::KeyboardEvent*); 1020 1020 #endif -
trunk/Tools/BuildSlaveSupport/built-product-archive
r215708 r216497 171 171 172 172 def archiveBuiltProduct(configuration, platform, fullPlatform): 173 assert platform in ('mac', 'win', 'gtk', 'efl', 'ios' )173 assert platform in ('mac', 'win', 'gtk', 'efl', 'ios', 'wpe') 174 174 175 175 if platform == 'ios': … … 199 199 shutil.rmtree(thinDirectory) 200 200 201 elif platform == 'gtk' or platform == 'efl' :201 elif platform == 'gtk' or platform == 'efl' or platform == 'wpe': 202 202 # On GTK+/EFL we don't need the intermediate step of creating a thinDirectory 203 203 # to be compressed in a ZIP file, because we can create the ZIP directly. … … 233 233 234 234 def extractBuiltProduct(configuration, platform): 235 assert platform in ('mac', 'win', 'gtk', 'efl', 'ios' )235 assert platform in ('mac', 'win', 'gtk', 'efl', 'ios', 'wpe') 236 236 237 237 archiveFile = os.path.join(_topLevelBuildDirectory, configuration + '.zip') … … 242 242 if platform in ('mac', 'ios'): 243 243 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': 245 245 print 'Extracting', _configurationBuildDirectory 246 246 return unzipArchive(_configurationBuildDirectory, configuration) -
trunk/Tools/BuildSlaveSupport/test-result-archive
r210358 r216497 47 47 48 48 def 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') 50 50 51 51 try: … … 67 67 if subprocess.call(["ditto", "-c", "-k", "--sequesterRsrc", "--zlibCompressionLevel", "2", layoutTestResultsDir, archiveFile]): 68 68 return 1 69 elif platform in ('win', 'gtk', 'efl', 'wincairo' ):69 elif platform in ('win', 'gtk', 'efl', 'wincairo', 'wpe'): 70 70 if subprocess.call(["zip", "-r", "-2", archiveFile, "."], cwd=layoutTestResultsDir): 71 71 return 1 -
trunk/Tools/CMakeLists.txt
r215758 r216497 24 24 add_subdirectory(TestWebKitAPI) 25 25 endif () 26 elseif ("${PORT}" STREQUAL "WPE") 27 if (DEVELOPER_MODE) 28 add_subdirectory(ImageDiff) 29 add_subdirectory(WebKitTestRunner) 30 endif () 26 31 endif () 27 32 -
trunk/Tools/ChangeLog
r216462 r216497 1 2017-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 1 67 2017-05-08 Jonathan Bedard <jbedard@apple.com> 2 68 -
trunk/Tools/Scripts/build-dumprendertree
r215758 r216497 66 66 if (isAppleCocoaWebKit()) { 67 67 $result = buildXCodeProject("DumpRenderTree", $clean, XcodeOptions(), @ARGV); 68 } elsif (isGtk() || is AnyWindows()) {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. 70 70 $result = 0; 71 71 } else { -
trunk/Tools/Scripts/build-webkit
r215758 r216497 101 101 102 102 --gtk Build the GTK+ port 103 --wpe Build the WPE port 103 104 --wincairo Build using Cairo (rather than CoreGraphics) on Windows 104 105 -
trunk/Tools/Scripts/build-webkittestrunner
r215763 r216497 62 62 if (isAppleCocoaWebKit()) { 63 63 $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. 66 66 $result = 0; 67 67 } else { -
trunk/Tools/Scripts/update-webkit-libs-jhbuild
r215758 r216497 25 25 my $platform = ""; 26 26 $platform = "gtk" if isGtk(); 27 $platform = "wpe" if isWPE(); 27 28 28 29 if (!$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"; 30 31 } 31 32 … … 133 134 chdir(relativeScriptsDir() . "/../jhbuild") or die $!; 134 135 135 my %prettyPlatform = ( "gtk" => "GTK+" );136 my %prettyPlatform = ( "gtk" => "GTK+", "wpe" => "WPE" ); 136 137 137 138 if (!$force && !jhbuildConfigurationChanged()) { -
trunk/Tools/Scripts/webkitdirs.pm
r215758 r216497 108 108 JSCOnly => "JSCOnly", 109 109 WinCairo => "WinCairo", 110 WPE => "WPE", 110 111 Unknown => "Unknown" 111 112 }; … … 446 447 push(@args, '--64-bit') if (isWin64()); 447 448 push(@args, '--gtk') if isGtk(); 449 push(@args, '--wpe') if isWPE(); 448 450 push(@args, '--jsc-only') if isJSCOnly(); 449 451 push(@args, '--wincairo') if isWinCairo(); … … 681 683 682 684 my $binaryDirectory; 683 if (isGtk() || isJSCOnly() ) {685 if (isGtk() || isJSCOnly() || isWPE()) { 684 686 $binaryDirectory = "bin"; 685 687 } elsif (isAnyWindows()) { … … 939 941 } 940 942 } 943 if (isWPE()) { 944 return "$configurationProductDir/lib/libWPEWebKit.so"; 945 } 941 946 942 947 die "Unsupported platform, can't determine built library locations.\nTry `build-webkit --help` for more information.\n"; … … 1053 1058 gtk => GTK, 1054 1059 'jsc-only' => JSCOnly, 1055 wincairo => WinCairo 1060 wincairo => WinCairo, 1061 wpe => WPE 1056 1062 ); 1057 1063 … … 1087 1093 --gtk 1088 1094 --jsc-only 1095 --wpe 1089 1096 ); 1090 1097 die "Please specify which WebKit port to build using one of the following options:" … … 1112 1119 { 1113 1120 return portName() eq JSCOnly; 1121 } 1122 1123 sub isWPE() 1124 { 1125 return portName() eq WPE; 1114 1126 } 1115 1127 … … 1517 1529 } elsif (isAppleWebKit()) { 1518 1530 return "$relativeScriptsPath/run-safari"; 1531 } elsif (isWPE()) { 1532 return "$relativeScriptsPath/run-wpe"; 1519 1533 } 1520 1534 } … … 1528 1542 } elsif (isAppleWinWebKit()) { 1529 1543 return "MiniBrowser"; 1544 } elsif (isWPE()) { 1545 return "WPELauncher"; 1530 1546 } 1531 1547 } … … 1827 1843 if (isGtk()) { 1828 1844 push(@jhbuildPath, "DependenciesGTK"); 1845 } elsif (isWPE()) { 1846 push(@jhbuildPath, "DependenciesWPE"); 1829 1847 } else { 1830 1848 die "Cannot get JHBuild path for platform that isn't GTK+.\n"; … … 1867 1885 if (isGtk()) { 1868 1886 push(@prefix, "--gtk"); 1887 } elsif (isWPE()) { 1888 push(@prefix, "--wpe"); 1869 1889 } 1870 1890 push(@prefix, "run"); … … 2025 2045 2026 2046 # 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(); 2028 2048 2029 2049 # Don't warn variables which aren't used by cmake ports. … … 2100 2120 if (isGtk() && checkForArgumentAndRemoveFromARGV("--update-gtk")) { 2101 2121 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 $!; 2102 2126 } 2103 2127 -
trunk/Tools/Scripts/webkitperl/FeatureList.pm
r216234 r216497 148 148 my @features = ( 149 149 { 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 }, 151 151 152 152 { 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 }, 154 154 155 155 { option => "allinone-build", desc => "Toggle all-in-one build", … … 184 184 185 185 { 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 }, 187 187 188 188 { option => "css-regions", desc => "Toggle CSS Regions support", … … 208 208 209 209 { 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 }, 211 211 212 212 { option => "dom4-events-constructor", desc => "Expose DOM4 Events constructors", … … 226 226 227 227 { 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 }, 229 229 230 230 { option => "ftpdir", desc => "Toggle FTP Directory support", … … 238 238 239 239 { 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 }, 241 241 242 242 { option => "high-dpi-canvas", desc => "Toggle High DPI Canvas support", … … 247 247 248 248 { 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 }, 250 250 251 251 { option => "input-speech", desc => "Toggle Input Speech support", … … 313 313 314 314 { option => "mhtml", desc => "Toggle MHTML support", 315 define => "ENABLE_MHTML", default => isGtk(), value => \$mhtmlSupport },315 define => "ENABLE_MHTML", default => (isGtk() || isWPE()), value => \$mhtmlSupport }, 316 316 317 317 { option => "mouse-cursor-scale", desc => "Toggle Scaled mouse cursor support", … … 325 325 326 326 { 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 }, 328 328 329 329 { option => "nosniff", desc => "Toggle support for 'X-Content-Type-Options: nosniff'", … … 337 337 338 338 { 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 }, 340 340 341 341 { option => "proximity-events", desc => "Toggle Proximity Events support", … … 367 367 368 368 { 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 }, 370 370 371 371 { option => "touch-icon-loading", desc => "Toggle Touch Icon Loading Support", … … 379 379 380 380 { 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 }, 382 382 383 383 { 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 }, 385 385 386 386 { option => "web-animations", desc => "Toggle Web Animations support", … … 388 388 389 389 { 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 }, 391 391 392 392 { option => "web-replay", desc => "Toggle Web Replay support", … … 403 403 404 404 { 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 }, 406 406 407 407 { 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 }, 409 409 410 410 { option => "writableStreamAPI", desc => "Toggle WritableStream API support", -
trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py
r216030 r216497 426 426 427 427 # 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"]: 429 429 options.webkit_test_runner = True 430 430 -
trunk/Tools/Scripts/webkitpy/port/factory.py
r215965 r216497 54 54 const=('gtk*' if use_globs else 'gtk'), 55 55 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')), 56 59 optparse.make_option('--no-install', action='store_const', 57 60 const=False, default=True, dest='install', … … 94 97 'win.WinCairoPort', 95 98 'win.WinPort', 99 'wpe.WPEPort', 96 100 ) 97 101 -
trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityController.cpp
r215758 r216497 72 72 } 73 73 74 #if !PLATFORM(GTK) 74 #if !PLATFORM(GTK) && !PLATFORM(WPE) 75 75 Ref<AccessibilityUIElement> AccessibilityController::rootElement() 76 76 { -
trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityController.h
r215758 r216497 74 74 #if PLATFORM(COCOA) 75 75 RetainPtr<NotificationHandler> m_globalNotificationHandler; 76 #el se76 #elif PLATFORM(GTK) || PLATFORM(EFL) 77 77 RefPtr<AccessibilityNotificationHandler> m_globalNotificationHandler; 78 78 #endif -
trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp
r215758 r216497 79 79 80 80 // 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) 82 82 JSRetainPtr<JSStringRef> AccessibilityUIElement::characterAtOffset(int) { return nullptr; } 83 83 JSRetainPtr<JSStringRef> AccessibilityUIElement::wordAtOffset(int) { return nullptr; } -
trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h
r215758 r216497 318 318 #endif 319 319 320 #if PLATFORM(COCOA) || PLATFORM(GTK) 320 #if PLATFORM(COCOA) || PLATFORM(GTK) || PLATFORM(WPE) 321 321 void getChildren(Vector<RefPtr<AccessibilityUIElement> >&); 322 322 void getChildrenWithRange(Vector<RefPtr<AccessibilityUIElement> >&, unsigned location, unsigned length); -
trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp
r216219 r216497 99 99 , m_userStyleSheetEnabled(false) 100 100 , m_userStyleSheetLocation(adoptWK(WKStringCreateWithUTF8CString(""))) 101 #if PLATFORM(GTK) 101 #if PLATFORM(GTK) || PLATFORM(WPE) 102 102 , m_waitToDumpWatchdogTimer(RunLoop::main(), this, &TestRunner::waitToDumpWatchdogTimerFired) 103 103 #endif -
trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h
r216219 r216497 39 39 #include <CoreFoundation/CFRunLoop.h> 40 40 typedef RetainPtr<CFRunLoopTimerRef> PlatformTimerRef; 41 #elif PLATFORM(GTK) 41 #elif PLATFORM(GTK) || PLATFORM(WPE) 42 42 #include <wtf/RunLoop.h> 43 43 namespace WTR { -
trunk/Tools/WebKitTestRunner/PlatformWebView.h
r215758 r216497 51 51 typedef GtkWidget* PlatformWindow; 52 52 typedef cairo_surface_t *PlatformImage; 53 #elif PLATFORM(WPE) 54 class HeadlessViewBackend; 55 typedef WKViewRef PlatformWKView; 56 typedef HeadlessViewBackend* PlatformWindow; 57 typedef cairo_surface_t* PlatformImage; 53 58 #endif 54 59 -
trunk/Tools/WebKitTestRunner/TestController.cpp
r216171 r216497 769 769 resetPreferencesToConsistentValues(options); 770 770 771 #if !PLATFORM(COCOA) 771 #if !PLATFORM(COCOA) && !PLATFORM(WPE) 772 772 WKTextCheckerContinuousSpellCheckingEnabledStateChanged(true); 773 773 #endif -
trunk/Tools/jhbuild/jhbuild-wrapper
r209804 r216497 32 32 if '--gtk' in sys.argv: 33 33 return "gtk"; 34 if '--wpe' in sys.argv: 35 return "wpe" 34 36 raise ValueError('No platform specified for jhbuild-wrapper.') 35 37
Note:
See TracChangeset
for help on using the changeset viewer.