Skip to content

Commit

Permalink
Merge r231042 - [WPE] Build and link against latest WPEBackend and WP…
Browse files Browse the repository at this point in the history
…EBackend-fdo

https://bugs.webkit.org/show_bug.cgi?id=184643

Reviewed by Žan Doberšek.

.:

Update find modules to include the API versions.

* Source/cmake/FindWPEBackend-fdo.cmake:
* Source/cmake/FindWPEBackend.cmake:

Source/WebCore:

Adapt to single-header WPE includes.

* platform/graphics/egl/GLContextEGLWPE.cpp:
* platform/graphics/wpe/PlatformDisplayWPE.cpp:
* platform/wpe/PlatformPasteboardWPE.cpp:

Source/WebKit:

Adapt to single-header WPE includes.

Null-initialize padding to silence -Wmissing-field-initializers. (Yuck.)

* Shared/NativeWebTouchEvent.h:
* Shared/wpe/WebEventFactory.cpp:
* UIProcess/API/glib/WebKitPrivate.cpp:
* UIProcess/API/wpe/CompositingManagerProxy.cpp:
* UIProcess/API/wpe/ScrollGestureController.h:
* UIProcess/API/wpe/WPEView.cpp:
(WKWPE::m_backend):
* UIProcess/API/wpe/WebKitWebViewBackend.h:
* UIProcess/Launcher/glib/ProcessLauncherGLib.cpp:
* WebProcess/WebPage/wpe/AcceleratedSurfaceWPE.cpp:
(WebKit::AcceleratedSurfaceWPE::initialize):

Tools:

Add missing INCLUDE_DIRS in many places.

Adapt to single-header WPE includes.

Null-initialize padding to silence -Wmissing-field-initializers. (Yuck.)

* TestWebKitAPI/PlatformWPE.cmake:
* TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp:
(testWebViewWebBackend):
* TestWebKitAPI/glib/PlatformWPE.cmake:
* WebKitTestRunner/EventSenderProxy.h:
* WebKitTestRunner/PlatformWPE.cmake:
* WebKitTestRunner/wpe/EventSenderProxyWPE.cpp:
* wpe/HeadlessViewBackend/CMakeLists.txt:
* wpe/HeadlessViewBackend/HeadlessViewBackend.cpp:
* wpe/HeadlessViewBackend/HeadlessViewBackend.h:
* wpe/jhbuild.modules:
  • Loading branch information
mcatanzaro committed May 9, 2018
1 parent 7fed843 commit 5a2f398
Show file tree
Hide file tree
Showing 28 changed files with 135 additions and 31 deletions.
12 changes: 12 additions & 0 deletions ChangeLog
@@ -1,3 +1,15 @@
2018-04-25 Michael Catanzaro <mcatanzaro@igalia.com>

[WPE] Build and link against latest WPEBackend and WPEBackend-fdo
https://bugs.webkit.org/show_bug.cgi?id=184643

Reviewed by Žan Doberšek.

Update find modules to include the API versions.

* Source/cmake/FindWPEBackend-fdo.cmake:
* Source/cmake/FindWPEBackend.cmake:

2018-04-15 Michael Catanzaro <mcatanzaro@igalia.com>

[WPE] Install files needed for WebKitWebExtensions
Expand Down
13 changes: 13 additions & 0 deletions Source/WebCore/ChangeLog
@@ -1,3 +1,16 @@
2018-04-25 Michael Catanzaro <mcatanzaro@igalia.com>

[WPE] Build and link against latest WPEBackend and WPEBackend-fdo
https://bugs.webkit.org/show_bug.cgi?id=184643

Reviewed by Žan Doberšek.

Adapt to single-header WPE includes.

* platform/graphics/egl/GLContextEGLWPE.cpp:
* platform/graphics/wpe/PlatformDisplayWPE.cpp:
* platform/wpe/PlatformPasteboardWPE.cpp:

2018-05-04 Carlos Garcia Campos <cgarcia@igalia.com>

[GTK] Epiphany (GNOME Web) says "Error downloading: Service Unavailable." when trying to download an image from discogs.com
Expand Down
2 changes: 1 addition & 1 deletion Source/WebCore/platform/graphics/egl/GLContextEGLWPE.cpp
Expand Up @@ -26,7 +26,7 @@
// somehow deducible from the build configuration.
#define __GBM__ 1
#include "EpoxyEGL.h"
#include <wpe/renderer-backend-egl.h>
#include <wpe/wpe-egl.h>

namespace WebCore {

Expand Down
Expand Up @@ -33,7 +33,7 @@
// somehow deducible from the build configuration.
#define __GBM__ 1
#include "EpoxyEGL.h"
#include <wpe/renderer-backend-egl.h>
#include <wpe/wpe-egl.h>

namespace WebCore {

Expand Down
3 changes: 1 addition & 2 deletions Source/WebCore/platform/wpe/PlatformPasteboardWPE.cpp
Expand Up @@ -27,8 +27,7 @@
#include "PlatformPasteboard.h"

#include "Pasteboard.h"
#include <map>
#include <wpe/pasteboard.h>
#include <wpe/wpe.h>
#include <wtf/Assertions.h>
#include <wtf/text/WTFString.h>

Expand Down
23 changes: 23 additions & 0 deletions Source/WebKit/ChangeLog
@@ -1,3 +1,26 @@
2018-04-25 Michael Catanzaro <mcatanzaro@igalia.com>

[WPE] Build and link against latest WPEBackend and WPEBackend-fdo
https://bugs.webkit.org/show_bug.cgi?id=184643

Reviewed by Žan Doberšek.

Adapt to single-header WPE includes.

Null-initialize padding to silence -Wmissing-field-initializers. (Yuck.)

* Shared/NativeWebTouchEvent.h:
* Shared/wpe/WebEventFactory.cpp:
* UIProcess/API/glib/WebKitPrivate.cpp:
* UIProcess/API/wpe/CompositingManagerProxy.cpp:
* UIProcess/API/wpe/ScrollGestureController.h:
* UIProcess/API/wpe/WPEView.cpp:
(WKWPE::m_backend):
* UIProcess/API/wpe/WebKitWebViewBackend.h:
* UIProcess/Launcher/glib/ProcessLauncherGLib.cpp:
* WebProcess/WebPage/wpe/AcceleratedSurfaceWPE.cpp:
(WebKit::AcceleratedSurfaceWPE::initialize):

2018-04-25 Michael Catanzaro <mcatanzaro@igalia.com>

[WPE] Remove deprecated functions and properties from the API
Expand Down
2 changes: 1 addition & 1 deletion Source/WebKit/Shared/NativeWebTouchEvent.h
Expand Up @@ -35,7 +35,7 @@ struct _UIWebTouchEvent;
#elif PLATFORM(GTK)
#include <WebCore/GUniquePtrGtk.h>
#elif PLATFORM(WPE)
#include <wpe/input.h>
#include <wpe/wpe.h>
#endif

namespace WebKit {
Expand Down
2 changes: 1 addition & 1 deletion Source/WebKit/Shared/wpe/WebEventFactory.cpp
Expand Up @@ -28,7 +28,7 @@

#include <WebCore/Scrollbar.h>
#include <cmath>
#include <wpe/input.h>
#include <wpe/wpe.h>
#include <wtf/glib/GUniquePtr.h>

namespace WebKit {
Expand Down
2 changes: 1 addition & 1 deletion Source/WebKit/UIProcess/API/glib/WebKitPrivate.cpp
Expand Up @@ -27,7 +27,7 @@
#if PLATFORM(GTK)
#include <gdk/gdk.h>
#elif PLATFORM(WPE)
#include <wpe/input.h>
#include <wpe/wpe.h>
#endif

#if PLATFORM(GTK)
Expand Down
Expand Up @@ -31,7 +31,7 @@
#include "WPEView.h"
#include "WebProcessPool.h"
#include "WebProcessProxy.h"
#include <wpe/view-backend.h>
#include <wpe/wpe.h>

namespace WebKit {

Expand Down
2 changes: 1 addition & 1 deletion Source/WebKit/UIProcess/API/wpe/ScrollGestureController.h
Expand Up @@ -25,7 +25,7 @@

#pragma once

#include <wpe/input.h>
#include <wpe/wpe.h>

namespace WebKit {

Expand Down
15 changes: 12 additions & 3 deletions Source/WebKit/UIProcess/API/wpe/WPEView.cpp
Expand Up @@ -35,8 +35,7 @@
#include "NativeWebWheelEvent.h"
#include "WebPageGroup.h"
#include "WebProcessPool.h"
#include <JavaScriptCore/JSBase.h>
#include <wpe/view-backend.h>
#include <wpe/wpe.h>

using namespace WebKit;

Expand Down Expand Up @@ -88,7 +87,12 @@ View::View(struct wpe_view_backend* backend, const API::PageConfiguration& baseC
{
auto& view = *reinterpret_cast<View*>(data);
view.frameDisplayed();
}
},
// padding
nullptr,
nullptr,
nullptr,
nullptr
};
wpe_view_backend_set_backend_client(m_backend, &s_backendClient, this);

Expand Down Expand Up @@ -125,6 +129,11 @@ View::View(struct wpe_view_backend* backend, const API::PageConfiguration& baseC
auto& page = reinterpret_cast<View*>(data)->page();
page.handleTouchEvent(WebKit::NativeWebTouchEvent(event, page.deviceScaleFactor()));
},
// padding
nullptr,
nullptr,
nullptr,
nullptr
};
wpe_view_backend_set_input_client(m_backend, &s_inputClient, this);

Expand Down
2 changes: 1 addition & 1 deletion Source/WebKit/UIProcess/API/wpe/WebKitWebViewBackend.h
Expand Up @@ -26,7 +26,7 @@

#include <glib-object.h>
#include <wpe/WebKitDefines.h>
#include <wpe/view-backend.h>
#include <wpe/wpe.h>

G_BEGIN_DECLS

Expand Down
Expand Up @@ -41,7 +41,7 @@
#include <wtf/text/WTFString.h>

#if PLATFORM(WPE)
#include <wpe/renderer-host.h>
#include <wpe/wpe.h>
#endif

namespace WebKit {
Expand Down
Expand Up @@ -28,7 +28,7 @@

#include "WebPage.h"
#include <WebCore/PlatformDisplayWPE.h>
#include <wpe/renderer-backend-egl.h>
#include <wpe/wpe-egl.h>

using namespace WebCore;

Expand Down Expand Up @@ -60,6 +60,11 @@ void AcceleratedSurfaceWPE::initialize()
auto& surface = *reinterpret_cast<AcceleratedSurfaceWPE*>(data);
surface.m_client.frameComplete();
},
// padding
nullptr,
nullptr,
nullptr,
nullptr
};
wpe_renderer_backend_egl_target_set_client(m_backend, &s_client, this);
wpe_renderer_backend_egl_target_initialize(m_backend, downcast<PlatformDisplayWPE>(PlatformDisplay::sharedDisplay()).backend(),
Expand Down
6 changes: 3 additions & 3 deletions Source/cmake/FindWPEBackend-fdo.cmake
Expand Up @@ -29,15 +29,15 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

find_package(PkgConfig)
pkg_check_modules(PC_WPEBACKEND_FDO QUIET wpebackend-fdo)
pkg_check_modules(PC_WPEBACKEND_FDO QUIET wpebackend-fdo-0.1)

find_path(WPEBACKEND_FDO_INCLUDE_DIRS
NAMES wpe-fdo/initialize-egl.h
NAMES wpe/fdo.h
HINTS ${PC_WPEBACKEND_FDO_INCLUDEDIR} ${PC_WPEBACKEND_FDO_INCLUDE_DIRS}
)

find_library(WPEBACKEND_FDO_LIBRARIES
NAMES WPEBackend-fdo
NAMES WPEBackend-fdo-0.1
HINTS ${PC_WPEBACKEND_FDO_LIBDIR} ${PC_WPEBACKEND_FDO_LIBRARY_DIRS}
)

Expand Down
6 changes: 3 additions & 3 deletions Source/cmake/FindWPEBackend.cmake
Expand Up @@ -29,15 +29,15 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

find_package(PkgConfig)
pkg_check_modules(PC_WPE QUIET wpe)
pkg_check_modules(PC_WPE QUIET wpe-0.1)

find_path(WPE_INCLUDE_DIRS
NAMES wpe/loader.h
NAMES wpe/wpe.h
HINTS ${PC_WPE_INCLUDEDIR} ${PC_WPE_INCLUDE_DIRS}
)

find_library(WPE_LIBRARIES
NAMES WPEBackend
NAMES WPEBackend-0.1
HINTS ${PC_WPE_LIBDIR} ${PC_WPE_LIBRARY_DIRS}
)

Expand Down
25 changes: 25 additions & 0 deletions Tools/ChangeLog
@@ -1,3 +1,28 @@
2018-04-25 Michael Catanzaro <mcatanzaro@igalia.com>

[WPE] Build and link against latest WPEBackend and WPEBackend-fdo
https://bugs.webkit.org/show_bug.cgi?id=184643

Reviewed by Žan Doberšek.

Add missing INCLUDE_DIRS in many places.

Adapt to single-header WPE includes.

Null-initialize padding to silence -Wmissing-field-initializers. (Yuck.)

* TestWebKitAPI/PlatformWPE.cmake:
* TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp:
(testWebViewWebBackend):
* TestWebKitAPI/glib/PlatformWPE.cmake:
* WebKitTestRunner/EventSenderProxy.h:
* WebKitTestRunner/PlatformWPE.cmake:
* WebKitTestRunner/wpe/EventSenderProxyWPE.cpp:
* wpe/HeadlessViewBackend/CMakeLists.txt:
* wpe/HeadlessViewBackend/HeadlessViewBackend.cpp:
* wpe/HeadlessViewBackend/HeadlessViewBackend.h:
* wpe/jhbuild.modules:

2018-04-25 Michael Catanzaro <mcatanzaro@igalia.com>

[WPE] Remove deprecated functions and properties from the API
Expand Down
2 changes: 2 additions & 0 deletions Tools/TestWebKitAPI/PlatformWPE.cmake
Expand Up @@ -22,6 +22,8 @@ include_directories(SYSTEM
${CAIRO_INCLUDE_DIRS}
${GLIB_INCLUDE_DIRS}
${LIBSOUP_INCLUDE_DIRS}
${WPE_INCLUDE_DIRS}
${WPEBACKEND_FDO_INCLUDE_DIRS}
)

set(test_main_SOURCES
Expand Down
7 changes: 6 additions & 1 deletion Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp
Expand Up @@ -130,7 +130,12 @@ static void testWebViewWebBackend(Test* test, gconstpointer)
// initialize
[](void*) { },
// get_renderer_host_fd
[](void*) -> int { return -1; }
[](void*) -> int { return -1; },
// padding
nullptr,
nullptr,
nullptr,
nullptr
};

// User provided backend with default deleter (we don't have a way to check the backend will be actually freed).
Expand Down
2 changes: 2 additions & 0 deletions Tools/TestWebKitAPI/glib/PlatformWPE.cmake
Expand Up @@ -14,9 +14,11 @@ list(APPEND WebKitGLibAPITests_INCLUDE_DIRECTORIES

list(APPEND WebKitGLibAPITests_SYSTEM_INCLUDE_DIRECTORIES
${WPE_INCLUDE_DIRS}
${WPEBACKEND_FDO_INCLUDE_DIRS}
)

list(APPEND WebKitGLibAPITest_LIBRARIES
${WPE_LIBRARIES}
${WPEBACKEND_FDO_LIBRARIES}
WPEHeadlessViewBackend
)
5 changes: 2 additions & 3 deletions Tools/WebKitTestRunner/EventSenderProxy.h
Expand Up @@ -29,18 +29,17 @@

#include <wtf/Deque.h>
#include <wtf/HashMap.h>
#include <wtf/HashSet.h>
#include <wtf/RetainPtr.h>
#include <wtf/Vector.h>

#if PLATFORM(GTK)
#include <WebCore/GUniquePtrGtk.h>
#include <gdk/gdk.h>
#include <wtf/HashSet.h>
#endif

#if PLATFORM(WPE)
#include <wpe/input.h>
#include <wtf/HashSet.h>
#include <wpe/wpe.h>
#endif

#if PLATFORM(COCOA)
Expand Down
3 changes: 3 additions & 0 deletions Tools/WebKitTestRunner/PlatformWPE.cmake
@@ -1,4 +1,5 @@
find_package(Libxkbcommon 0.4.0 REQUIRED)
find_package(WPEBackend-fdo REQUIRED)

add_custom_target(WebKitTestRunner-forwarding-headers
COMMAND ${PERL_EXECUTABLE} ${WEBKIT_DIR}/Scripts/generate-forwarding-headers.pl --include-path ${WEBKIT_TESTRUNNER_DIR} --output ${FORWARDING_HEADERS_DIR} --platform wpe
Expand All @@ -25,12 +26,14 @@ list(APPEND WebKitTestRunner_SYSTEM_INCLUDE_DIRECTORIES
${CAIRO_INCLUDE_DIRS}
${GLIB_INCLUDE_DIRS}
${LIBXKBCOMMON_INCLUDE_DIRS}
${WPEBACKEND_FDO_INCLUDE_DIRS}
)

list(APPEND WebKitTestRunner_LIBRARIES
${CAIRO_LIBRARIES}
${GLIB_LIBRARIES}
${LIBXKBCOMMON_LIBRARIES}
${WPEBACKEND_FDO_LIBRARIES}
WPEHeadlessViewBackend
)

Expand Down
2 changes: 1 addition & 1 deletion Tools/WebKitTestRunner/wpe/EventSenderProxyWPE.cpp
Expand Up @@ -30,7 +30,7 @@
#include "PlatformWebView.h"
#include "TestController.h"
#include <WebCore/NotImplemented.h>
#include <wpe/view-backend.h>
#include <wpe/wpe.h>
#include <xkbcommon/xkbcommon-keysyms.h>
#include <xkbcommon/xkbcommon.h>

Expand Down
2 changes: 2 additions & 0 deletions Tools/wpe/HeadlessViewBackend/CMakeLists.txt
Expand Up @@ -7,12 +7,14 @@ set(WPEHeadlessViewBackend_SOURCES
set(WPEHeadlessViewBackend_SYSTEM_INCLUDE_DIRECTORIES
${CAIRO_INCLUDE_DIRS}
${GLIB_INCLUDE_DIRS}
${WPE_INCLUDE_DIRS}
${WPEBACKEND_FDO_INCLUDE_DIRS}
)

set(WPEHeadlessViewBackend_LIBRARIES
${CAIRO_LIBRARIES}
${GLIB_LIBRARIES}
${WPE_LIBRARIES}
${WPEBACKEND_FDO_LIBRARIES}
)

Expand Down
7 changes: 6 additions & 1 deletion Tools/wpe/HeadlessViewBackend/HeadlessViewBackend.cpp
Expand Up @@ -28,7 +28,7 @@
#include <cassert>
#include <fcntl.h>
#include <unistd.h>
#include <wpe-fdo/initialize-egl.h>
#include <wpe/fdo-egl.h>

// Manually provide the EGL_CAST C++ definition in case eglplatform.h doesn't provide it.
#ifndef EGL_CAST
Expand Down Expand Up @@ -232,4 +232,9 @@ struct wpe_view_backend_exportable_fdo_client HeadlessViewBackend::s_exportableC
EGLImageKHR image = egl.createImage(egl.display, EGL_NO_CONTEXT, EGL_WAYLAND_BUFFER_WL, bufferResource, attributes);
backend.m_pendingImage = { bufferResource, std::make_tuple(image, width, height) };
},
// padding
nullptr,
nullptr,
nullptr,
nullptr
};

0 comments on commit 5a2f398

Please sign in to comment.