Diff
Modified: releases/WebKitGTK/webkit-2.20/ChangeLog (231615 => 231616)
--- releases/WebKitGTK/webkit-2.20/ChangeLog 2018-05-09 23:59:12 UTC (rev 231615)
+++ releases/WebKitGTK/webkit-2.20/ChangeLog 2018-05-09 23:59:15 UTC (rev 231616)
@@ -1,3 +1,12 @@
+2018-04-15 Michael Catanzaro <[email protected]>
+
+ [WPE] Install files needed for WebKitWebExtensions
+ https://bugs.webkit.org/show_bug.cgi?id=179915
+
+ Reviewed by Žan Doberšek.
+
+ * Source/cmake/OptionsWPE.cmake:
+
2018-04-24 Zan Dobersek <[email protected]>
[WPE] Remove libgbm dependency
Modified: releases/WebKitGTK/webkit-2.20/Source/WebKit/ChangeLog (231615 => 231616)
--- releases/WebKitGTK/webkit-2.20/Source/WebKit/ChangeLog 2018-05-09 23:59:12 UTC (rev 231615)
+++ releases/WebKitGTK/webkit-2.20/Source/WebKit/ChangeLog 2018-05-09 23:59:15 UTC (rev 231616)
@@ -1,3 +1,14 @@
+2018-04-15 Michael Catanzaro <[email protected]>
+
+ [WPE] Install files needed for WebKitWebExtensions
+ https://bugs.webkit.org/show_bug.cgi?id=179915
+
+ Reviewed by Žan Doberšek.
+
+ * PlatformWPE.cmake: Install pkg-config file, injected bundle, and API headers.
+ * UIProcess/API/glib/WebKitWebContext.cpp: Load the injected bundle when installed.
+ * wpe/wpe-web-extension.pc.in: Added.
+
2018-04-12 Michael Catanzaro <[email protected]>
[WPE] Move libWPEWebInspectorResources.so to pkglibdir
Modified: releases/WebKitGTK/webkit-2.20/Source/WebKit/PlatformWPE.cmake (231615 => 231616)
--- releases/WebKitGTK/webkit-2.20/Source/WebKit/PlatformWPE.cmake 2018-05-09 23:59:12 UTC (rev 231615)
+++ releases/WebKitGTK/webkit-2.20/Source/WebKit/PlatformWPE.cmake 2018-05-09 23:59:15 UTC (rev 231616)
@@ -10,9 +10,11 @@
file(MAKE_DIRECTORY ${FORWARDING_HEADERS_WPE_EXTENSION_DIR})
configure_file(wpe/wpe-webkit.pc.in ${CMAKE_BINARY_DIR}/wpe-webkit-${WPE_API_VERSION}.pc @ONLY)
+configure_file(wpe/wpe-web-extension.pc.in ${CMAKE_BINARY_DIR}/wpe-web-extension-${WPE_API_VERSION}.pc @ONLY)
add_definitions(-DWEBKIT2_COMPILATION)
+add_definitions(-DPKGLIBDIR="${LIB_INSTALL_DIR}/wpe-webkit-${WPE_API_VERSION}")
add_definitions(-DPKGLIBEXECDIR="${LIBEXEC_INSTALL_DIR}")
add_definitions(-DLOCALEDIR="${CMAKE_INSTALL_FULL_LOCALEDIR}")
@@ -80,6 +82,7 @@
${DERIVED_SOURCES_WEBKIT_DIR}/WebKitResourcesGResourceBundle.c
${DERIVED_SOURCES_WPE_API_DIR}/WebKitEnumTypes.cpp
+ ${DERIVED_SOURCES_WPE_API_DIR}/WebKitWebProcessEnumTypes.cpp
)
set(WPE_API_INSTALLED_HEADERS
@@ -104,7 +107,6 @@
${WEBKIT_DIR}/UIProcess/API/wpe/WebKitFindController.h
${WEBKIT_DIR}/UIProcess/API/wpe/WebKitFormSubmissionRequest.h
${WEBKIT_DIR}/UIProcess/API/wpe/WebKitGeolocationPermissionRequest.h
- ${WEBKIT_DIR}/UIProcess/API/wpe/WebKitHitTestResult.h
${WEBKIT_DIR}/UIProcess/API/wpe/WebKitInstallMissingMediaPluginsPermissionRequest.h
${WEBKIT_DIR}/UIProcess/API/wpe/WebKitJavascriptResult.h
${WEBKIT_DIR}/UIProcess/API/wpe/WebKitMimeInfo.h
@@ -138,6 +140,17 @@
${WEBKIT_DIR}/UIProcess/API/wpe/webkit.h
)
+set(WPE_WEB_EXTENSION_API_INSTALLED_HEADERS
+ ${DERIVED_SOURCES_WPE_API_DIR}/WebKitWebProcessEnumTypes.h
+ ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/wpe/WebKitConsoleMessage.h
+ ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/wpe/WebKitFrame.h
+ ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/wpe/WebKitScriptWorld.h
+ ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/wpe/WebKitWebEditor.h
+ ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/wpe/WebKitWebExtension.h
+ ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/wpe/WebKitWebPage.h
+ ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/wpe/webkit-web-extension.h
+)
+
# To generate WebKitEnumTypes.h we want to use all installed headers, except WebKitEnumTypes.h itself.
set(WPE_ENUM_GENERATION_HEADERS ${WPE_API_INSTALLED_HEADERS})
list(REMOVE_ITEM WPE_ENUM_GENERATION_HEADERS ${DERIVED_SOURCES_WPE_API_DIR}/WebKitEnumTypes.h)
@@ -152,6 +165,19 @@
VERBATIM
)
+set(WPE_WEB_PROCESS_ENUM_GENERATION_HEADERS ${WPE_WEB_EXTENSION_API_INSTALLED_HEADERS})
+list(REMOVE_ITEM WPE_WEB_PROCESS_ENUM_GENERATION_HEADERS ${DERIVED_SOURCES_WPE_API_DIR}/WebKitWebProcessEnumTypes.h)
+add_custom_command(
+ OUTPUT ${DERIVED_SOURCES_WPE_API_DIR}/WebKitWebProcessEnumTypes.h
+ ${DERIVED_SOURCES_WPE_API_DIR}/WebKitWebProcessEnumTypes.cpp
+ DEPENDS ${WPE_WEB_PROCESS_ENUM_GENERATION_HEADERS}
+
+ COMMAND glib-mkenums --template ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/wpe/WebKitWebProcessEnumTypes.h.template ${WPE_WEB_PROCESS_ENUM_GENERATION_HEADERS} | sed s/web_kit/webkit/ | sed s/WEBKIT_TYPE_KIT/WEBKIT_TYPE/ > ${DERIVED_SOURCES_WPE_API_DIR}/WebKitWebProcessEnumTypes.h
+
+ COMMAND glib-mkenums --template ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/wpe/WebKitWebProcessEnumTypes.cpp.template ${WPE_WEB_PROCESS_ENUM_GENERATION_HEADERS} | sed s/web_kit/webkit/ > ${DERIVED_SOURCES_WPE_API_DIR}/WebKitWebProcessEnumTypes.cpp
+ VERBATIM
+)
+
set(WebKitResources
)
@@ -271,12 +297,18 @@
target_include_directories(WPEInjectedBundle PRIVATE ${WebKit_INCLUDE_DIRECTORIES})
target_include_directories(WPEInjectedBundle SYSTEM PRIVATE ${WebKit_SYSTEM_INCLUDE_DIRECTORIES})
+install(TARGETS WPEInjectedBundle
+ DESTINATION "${LIB_INSTALL_DIR}/wpe-webkit-${WPE_API_VERSION}/injected-bundle"
+)
+
install(FILES "${CMAKE_BINARY_DIR}/wpe-webkit-${WPE_API_VERSION}.pc"
- DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig"
- COMPONENT "Development"
+ "${CMAKE_BINARY_DIR}/wpe-web-extension-${WPE_API_VERSION}.pc"
+ DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig"
+ COMPONENT "Development"
)
install(FILES ${WPE_API_INSTALLED_HEADERS}
- DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/wpe-webkit-${WPE_API_VERSION}/wpe"
- COMPONENT "Development"
+ ${WPE_WEB_EXTENSION_API_INSTALLED_HEADERS}
+ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/wpe-webkit-${WPE_API_VERSION}/wpe"
+ COMPONENT "Development"
)
Modified: releases/WebKitGTK/webkit-2.20/Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp (231615 => 231616)
--- releases/WebKitGTK/webkit-2.20/Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp 2018-05-09 23:59:12 UTC (rev 231615)
+++ releases/WebKitGTK/webkit-2.20/Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp 2018-05-09 23:59:15 UTC (rev 231616)
@@ -263,8 +263,8 @@
G_DIR_SEPARATOR_S "injected-bundle" G_DIR_SEPARATOR_S;
return injectedBundlePath;
#elif PLATFORM(WPE)
- // FIXME: Make it possible to use installed injected bundle in WPE.
- return nullptr;
+ static const char* injectedBundlePath = PKGLIBDIR G_DIR_SEPARATOR_S "injected-bundle" G_DIR_SEPARATOR_S;
+ return injectedBundlePath;
#endif
}
Added: releases/WebKitGTK/webkit-2.20/Source/WebKit/WebProcess/InjectedBundle/API/wpe/WebKitWebProcessEnumTypes.cpp.template (0 => 231616)
--- releases/WebKitGTK/webkit-2.20/Source/WebKit/WebProcess/InjectedBundle/API/wpe/WebKitWebProcessEnumTypes.cpp.template (rev 0)
+++ releases/WebKitGTK/webkit-2.20/Source/WebKit/WebProcess/InjectedBundle/API/wpe/WebKitWebProcessEnumTypes.cpp.template 2018-05-09 23:59:15 UTC (rev 231616)
@@ -0,0 +1,62 @@
+/*** BEGIN file-header ***/
+/*
+ * Copyright (C) 2017 Igalia S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include <config.h>
+#include "WebKitWebProcessEnumTypes.h"
+
+#include <wpe/webkit-web-extension.h>
+extern "C" {
+/*** END file-header ***/
+
+
+/*** BEGIN file-production ***/
+// Enumerations from @filename@.
+/*** END file-production ***/
+
+
+/*** BEGIN value-header ***/
+GType @enum_name@_get_type()
+{
+ static const G@Type@Value values[] = {
+/*** END value-header ***/
+
+
+/*** BEGIN value-production ***/
+ { @VALUENAME@, "@VALUENAME@", "@valuenick@" },
+/*** END value-production ***/
+
+
+/*** BEGIN value-tail ***/
+ { 0, NULL, NULL }
+ };
+
+ static GType type = 0;
+ if (G_UNLIKELY(!type))
+ type = g_@type@_register_static("@EnumName@", values);
+
+ return type;
+}
+
+/*** END value-tail ***/
+
+
+/*** BEGIN file-tail ***/
+}
+/*** END file-tail ***/
Added: releases/WebKitGTK/webkit-2.20/Source/WebKit/WebProcess/InjectedBundle/API/wpe/WebKitWebProcessEnumTypes.h.template (0 => 231616)
--- releases/WebKitGTK/webkit-2.20/Source/WebKit/WebProcess/InjectedBundle/API/wpe/WebKitWebProcessEnumTypes.h.template (rev 0)
+++ releases/WebKitGTK/webkit-2.20/Source/WebKit/WebProcess/InjectedBundle/API/wpe/WebKitWebProcessEnumTypes.h.template 2018-05-09 23:59:15 UTC (rev 231616)
@@ -0,0 +1,53 @@
+/*** BEGIN file-header ***/
+/*
+ * Copyright (C) 2017 Igalia S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#if !defined(__WEBKIT_WEB_EXTENSION_H_INSIDE__) && !defined(WEBKIT2_COMPILATION)
+#error "Only <wpe/webkit-web-extension.h> can be included directly."
+#endif
+
+#ifndef WEBKIT_WEB_PROCESS_ENUM_TYPES_H
+#define WEBKIT_WEB_PROCESS_ENUM_TYPES_H
+
+#include <glib-object.h>
+#include <wpe/WebKitDefines.h>
+
+G_BEGIN_DECLS
+/*** END file-header ***/
+
+
+/*** BEGIN file-production ***/
+/* Enumerations from @basename@. */
+/*** END file-production ***/
+
+
+/*** BEGIN enumeration-production ***/
+#define WEBKIT_TYPE_@ENUMSHORT@ @enum_name@_get_type ()
+
+WEBKIT_API GType
+@enum_name@_get_type (void);
+
+/*** END enumeration-production ***/
+
+
+/*** BEGIN file-tail ***/
+G_END_DECLS
+
+#endif
+/*** END file-tail ***/
Added: releases/WebKitGTK/webkit-2.20/Source/WebKit/wpe/wpe-web-extension.pc.in (0 => 231616)
--- releases/WebKitGTK/webkit-2.20/Source/WebKit/wpe/wpe-web-extension.pc.in (rev 0)
+++ releases/WebKitGTK/webkit-2.20/Source/WebKit/wpe/wpe-web-extension.pc.in 2018-05-09 23:59:15 UTC (rev 231616)
@@ -0,0 +1,12 @@
+prefix=@CMAKE_INSTALL_PREFIX@
+exec_prefix=${prefix}
+libdir=@LIB_INSTALL_DIR@
+includedir=${prefix}/include
+
+Name: WPE WebKit Web process extensions
+Description: Embeddable Web content engine - Web process extensions
+URL: https://wpewebkit.org
+Version: @PROJECT_VERSION@
+Requires: glib-2.0 libsoup-2.4
+Libs: -L${libdir} -lWPEWebKit-@WPE_API_VERSION@
+Cflags: -I${includedir}/wpe-webkit-@WPE_API_VERSION@