Skip to content
Permalink
Browse files
[GTK] Add support for loading web process extensions
https://bugs.webkit.org/show_bug.cgi?id=105631

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2013-01-10
Reviewed by Gustavo Noronha Silva.

.:

* GNUmakefile.am: Add webkit2_web_extension_h_api.
* Source/autotools/symbols.filter: Export WebGtkExtensionManager
symbols required by the injected bundle lib.

Source/WebKit2:

* GNUmakefile.am: Link to libWebCoreDOM.la and build injected
bundle lib.
* GNUmakefile.list.am: Add new files to compilation.
* UIProcess/API/gtk/WebKitWebContext.cpp:
(injectedBundleDirectory): Helper funtion to get the injected
bundle directory.
(injectedBundleFilename): Helper funtion to get the injected undle
library full path.
(createDefaultWebContext): Create the WebContext with an injected
bundle path.
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkit_web_view_get_page_id): Return the identifier of the web
page associated to the web view.
* UIProcess/API/gtk/WebKitWebView.h:
* UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add new chapter for
web extensions.
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
* UIProcess/API/gtk/docs/webkit2gtk.types: Add new types.
* UIProcess/API/gtk/tests/GNUmakefile.am: Add new files to compilation.
* UIProcess/API/gtk/tests/TestMain.cpp:
(main):
* UIProcess/API/gtk/tests/TestWebExtensions.cpp: Added.
(testWebExtension):
(beforeAll):
(afterAll):
* UIProcess/API/gtk/tests/WebExtensionTest.cpp: Added.
(methodCallCallback):
(webkit_web_extension_initialize):
* UIProcess/API/gtk/tests/WebKitTestBus.cpp: Added.
(WebKitTestBus::WebKitTestBus):
(WebKitTestBus::run):
(WebKitTestBus::~WebKitTestBus):
(WebKitTestBus::connection):
(onNameAppeared):
(WebKitTestBus::createProxy):
* UIProcess/API/gtk/tests/WebKitTestBus.h: Added.
(WebKitTestBus):
* WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp: Added.
(_WebKitWebExtensionPrivate):
(webkitWebExtensionPageCreated): Create a WebKitWebPage for the
newly crated page and emit WebKitWebExtension::page-created
signals.
(webkitWebExtensionPageDestroy): Remove the page from the map.
(didCreatePage): Call webkitWebExtensionPageCreated().
(willDestroyPage): Call webkitWebExtensionPageDestroy().
(webkitWebExtensionCreate): Create a new WebKitWebExtension and
initialize the injected bundle client.
(webkit_web_extension_get_page): Return the WebKitWebPage for the
given page identifier.
* WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.h: Added.
(_WebKitWebExtension):
(_WebKitWebExtensionClass):
* WebProcess/InjectedBundle/API/gtk/WebKitWebExtensionDefines.h: Added.
* WebProcess/InjectedBundle/API/gtk/WebKitWebExtensionPrivate.h: Added.
* WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp: Added.
(_WebKitWebPagePrivate):
(webkit_web_page_class_init):
(webkitWebPageCreate): Create a new WebKitWebPage.
(webkit_web_page_get_dom_document): Return the WebKitDOMDocument
loaded in the WebKitWebPage.
* WebProcess/InjectedBundle/API/gtk/WebKitWebPage.h: Added.
(_WebKitWebPage):
(_WebKitWebPageClass):
* WebProcess/InjectedBundle/API/gtk/WebKitWebPagePrivate.h: Added.
* WebProcess/InjectedBundle/API/gtk/webkit-web-extension.h: Added.
* WebProcess/gtk/WebGtkExtensionManager.cpp: Added.
(WebKit::WebGtkExtensionManager::shared): Return the global shared
instance.
(WebKit::WebGtkExtensionManager::WebGtkExtensionManager):
(WebKit::WebGtkExtensionManager::appendModuleDirectories): Add
directories to scan for modules.
(WebKit::WebGtkExtensionManager::scanModules): Scan for modules.
(WebKit::WebGtkExtensionManager::initialize): Load and initialize
the modules found.
* WebProcess/gtk/WebGtkExtensionManager.h: Added.
* WebProcess/gtk/WebGtkInjectedBundleMain.cpp: Added.
(WKBundleInitialize): Initialize WebGtkExtensionManager.

Tools:

* MiniBrowser/gtk/GNUmakefile.am:
* MiniBrowser/gtk/main.c:
(main): Set WEBKIT_INJECTED_BUNDLE env var to use the injected
bundle lib from build dir.
* Scripts/webkitpy/style/checker.py: Add exceptions for GTK+ API
located in WebProcess/InjectedBundle/API/gtk.
* gtk/generate-gtkdoc:
(get_webkit2_options): Scan also files in
WebProcess/InjectedBundle/API/gtk to generate API docs.
(get_webkit2_options.injected_bundle_src_path): Helper function to
build paths in WebProcess/InjectedBundle/API/gtk.

Canonical link: https://commits.webkit.org/124753@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@139305 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
carlosgcampos authored and webkit-commit-queue committed Jan 10, 2013
1 parent 044b35f commit af4cae65bc14b8c306794904b805b66df63b31ed
Showing with 1,255 additions and 9 deletions.
  1. +11 −0 ChangeLog
  2. +1 −0 GNUmakefile.am
  3. +85 −0 Source/WebKit2/ChangeLog
  4. +42 −3 Source/WebKit2/GNUmakefile.am
  5. +18 −2 Source/WebKit2/GNUmakefile.list.am
  6. +16 −1 Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp
  7. +16 −0 Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp
  8. +3 −0 Source/WebKit2/UIProcess/API/gtk/WebKitWebView.h
  9. +6 −0 Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-docs.sgml
  10. +40 −0 Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-sections.txt
  11. +2 −0 Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk.types
  12. +35 −0 Source/WebKit2/UIProcess/API/gtk/tests/GNUmakefile.am
  13. +1 −0 Source/WebKit2/UIProcess/API/gtk/tests/TestMain.cpp
  14. +61 −0 Source/WebKit2/UIProcess/API/gtk/tests/TestWebExtensions.cpp
  15. +93 −0 Source/WebKit2/UIProcess/API/gtk/tests/WebExtensionTest.cpp
  16. +106 −0 Source/WebKit2/UIProcess/API/gtk/tests/WebKitTestBus.cpp
  17. +43 −0 Source/WebKit2/UIProcess/API/gtk/tests/WebKitTestBus.h
  18. +130 −0 Source/WebKit2/WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp
  19. +72 −0 Source/WebKit2/WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.h
  20. +47 −0 Source/WebKit2/WebProcess/InjectedBundle/API/gtk/WebKitWebExtensionDefines.h
  21. +28 −0 Source/WebKit2/WebProcess/InjectedBundle/API/gtk/WebKitWebExtensionPrivate.h
  22. +66 −0 Source/WebKit2/WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp
  23. +62 −0 Source/WebKit2/WebProcess/InjectedBundle/API/gtk/WebKitWebPage.h
  24. +28 −0 Source/WebKit2/WebProcess/InjectedBundle/API/gtk/WebKitWebPagePrivate.h
  25. +30 −0 Source/WebKit2/WebProcess/InjectedBundle/API/gtk/webkit-web-extension.h
  26. +89 −0 Source/WebKit2/WebProcess/gtk/WebGtkExtensionManager.cpp
  27. +57 −0 Source/WebKit2/WebProcess/gtk/WebGtkExtensionManager.h
  28. +35 −0 Source/WebKit2/WebProcess/gtk/WebGtkInjectedBundleMain.cpp
  29. +2 −0 Source/autotools/symbols.filter
  30. +19 −0 Tools/ChangeLog
  31. +1 −0 Tools/MiniBrowser/gtk/GNUmakefile.am
  32. +1 −0 Tools/MiniBrowser/gtk/main.c
  33. +5 −2 Tools/Scripts/webkitpy/style/checker.py
  34. +4 −1 Tools/gtk/generate-gtkdoc
@@ -1,3 +1,14 @@
2013-01-10 Carlos Garcia Campos <cgarcia@igalia.com>

[GTK] Add support for loading web process extensions
https://bugs.webkit.org/show_bug.cgi?id=105631

Reviewed by Gustavo Noronha Silva.

* GNUmakefile.am: Add webkit2_web_extension_h_api.
* Source/autotools/symbols.filter: Export WebGtkExtensionManager
symbols required by the injected bundle lib.

2013-01-10 Christophe Dumez <christophe.dumez@intel.com>

[EFL] Add gstreamer 1.0.5 to jhbuild
@@ -98,6 +98,7 @@ webkit2_sources :=
webkit2_built_sources :=
webkit2gtk_h_api :=
webkit2gtk_built_sources :=
webkit2_web_extension_h_api :=
webkit2_plugin_process_sources :=
webkit2_plugin_process_built_sources :=
webkittestrunner_built_sources :=
@@ -1,3 +1,88 @@
2013-01-10 Carlos Garcia Campos <cgarcia@igalia.com>

[GTK] Add support for loading web process extensions
https://bugs.webkit.org/show_bug.cgi?id=105631

Reviewed by Gustavo Noronha Silva.

* GNUmakefile.am: Link to libWebCoreDOM.la and build injected
bundle lib.
* GNUmakefile.list.am: Add new files to compilation.
* UIProcess/API/gtk/WebKitWebContext.cpp:
(injectedBundleDirectory): Helper funtion to get the injected
bundle directory.
(injectedBundleFilename): Helper funtion to get the injected undle
library full path.
(createDefaultWebContext): Create the WebContext with an injected
bundle path.
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkit_web_view_get_page_id): Return the identifier of the web
page associated to the web view.
* UIProcess/API/gtk/WebKitWebView.h:
* UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add new chapter for
web extensions.
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
* UIProcess/API/gtk/docs/webkit2gtk.types: Add new types.
* UIProcess/API/gtk/tests/GNUmakefile.am: Add new files to compilation.
* UIProcess/API/gtk/tests/TestMain.cpp:
(main):
* UIProcess/API/gtk/tests/TestWebExtensions.cpp: Added.
(testWebExtension):
(beforeAll):
(afterAll):
* UIProcess/API/gtk/tests/WebExtensionTest.cpp: Added.
(methodCallCallback):
(webkit_web_extension_initialize):
* UIProcess/API/gtk/tests/WebKitTestBus.cpp: Added.
(WebKitTestBus::WebKitTestBus):
(WebKitTestBus::run):
(WebKitTestBus::~WebKitTestBus):
(WebKitTestBus::connection):
(onNameAppeared):
(WebKitTestBus::createProxy):
* UIProcess/API/gtk/tests/WebKitTestBus.h: Added.
(WebKitTestBus):
* WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp: Added.
(_WebKitWebExtensionPrivate):
(webkitWebExtensionPageCreated): Create a WebKitWebPage for the
newly crated page and emit WebKitWebExtension::page-created
signals.
(webkitWebExtensionPageDestroy): Remove the page from the map.
(didCreatePage): Call webkitWebExtensionPageCreated().
(willDestroyPage): Call webkitWebExtensionPageDestroy().
(webkitWebExtensionCreate): Create a new WebKitWebExtension and
initialize the injected bundle client.
(webkit_web_extension_get_page): Return the WebKitWebPage for the
given page identifier.
* WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.h: Added.
(_WebKitWebExtension):
(_WebKitWebExtensionClass):
* WebProcess/InjectedBundle/API/gtk/WebKitWebExtensionDefines.h: Added.
* WebProcess/InjectedBundle/API/gtk/WebKitWebExtensionPrivate.h: Added.
* WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp: Added.
(_WebKitWebPagePrivate):
(webkit_web_page_class_init):
(webkitWebPageCreate): Create a new WebKitWebPage.
(webkit_web_page_get_dom_document): Return the WebKitDOMDocument
loaded in the WebKitWebPage.
* WebProcess/InjectedBundle/API/gtk/WebKitWebPage.h: Added.
(_WebKitWebPage):
(_WebKitWebPageClass):
* WebProcess/InjectedBundle/API/gtk/WebKitWebPagePrivate.h: Added.
* WebProcess/InjectedBundle/API/gtk/webkit-web-extension.h: Added.
* WebProcess/gtk/WebGtkExtensionManager.cpp: Added.
(WebKit::WebGtkExtensionManager::shared): Return the global shared
instance.
(WebKit::WebGtkExtensionManager::WebGtkExtensionManager):
(WebKit::WebGtkExtensionManager::appendModuleDirectories): Add
directories to scan for modules.
(WebKit::WebGtkExtensionManager::scanModules): Scan for modules.
(WebKit::WebGtkExtensionManager::initialize): Load and initialize
the modules found.
* WebProcess/gtk/WebGtkExtensionManager.h: Added.
* WebProcess/gtk/WebGtkInjectedBundleMain.cpp: Added.
(WKBundleInitialize): Initialize WebGtkExtensionManager.

2013-01-10 Huang Dongsung <luxtella@company100.net>

REGRESSION(r139189): pixel alignment must be performed in device units.
@@ -23,7 +23,8 @@ nodist_libwebkit2gtkinclude_HEADERS = \
DerivedSources/WebKit2/webkit2gtk/webkit2/WebKitVersion.h

libwebkit2gtkinclude_HEADERS = \
$(webkit2gtk_h_api)
$(webkit2gtk_h_api) \
$(webkit2_web_extension_h_api)

nodist_libwebkit2gtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_SOURCES = \
$(webkit2_built_sources) \
@@ -87,6 +88,7 @@ libwebkit2gtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_CPP
-I$(srcdir)/Source/WebKit2/WebProcess/InjectedBundle \
-I$(srcdir)/Source/WebKit2/WebProcess/InjectedBundle/API \
-I$(srcdir)/Source/WebKit2/WebProcess/InjectedBundle/API/c \
-I$(srcdir)/Source/WebKit2/WebProcess/InjectedBundle/API/gtk \
-I$(srcdir)/Source/WebKit2/WebProcess/InjectedBundle/DOM \
-I$(srcdir)/Source/WebKit2/WebProcess/InjectedBundle/gtk \
-I$(srcdir)/Source/WebKit2/WebProcess/KeyValueStorage \
@@ -103,17 +105,21 @@ libwebkit2gtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_CPP
-I$(srcdir)/Source/WebKit2/WebProcess/WebCoreSupport/gtk \
-I$(srcdir)/Source/WebKit2/WebProcess/WebCoreSupport/soup \
-I$(srcdir)/Source/WebKit2/WebProcess/WebPage \
-I$(srcdir)/Source/WebKit2/WebProcess/WebPage/atk \
-I$(srcdir)/Source/WebKit2/WebProcess/WebPage/atk \
-I$(srcdir)/Source/WebKit2/WebProcess/WebPage/gtk \
-I$(top_builddir)/DerivedSources/WebKit2 \
-I$(top_builddir)/DerivedSources/WebKit2/include \
-I$(top_builddir)/DerivedSources/WebKit2/webkit2gtk \
-I$(top_builddir)/DerivedSources/WebKit2/webkit2gtk/include \
-I$(top_builddir)/DerivedSources/WebKit2/webkit2gtk/webkit2 \
-I$(top_builddir)/DerivedSources/WebKit2/webkit2extension/include \
-I$(top_builddir)/DerivedSources/WebKit2/include/JavaScriptCore \
-I$(top_builddir)/DerivedSources/WebKit2/include/WebCore \
-I$(top_builddir)/DerivedSources/WebKit2/include/WebKit2 \
-I$(top_builddir)/DerivedSources/webkitdom \
-DLIBEXECDIR=\""$(libexecdir)"\" \
-DLIBDIR=\""$(libdir)"\" \
-DBUILDING_WEBKIT \
-DWEBKIT2_COMPILATION \
-DENABLE_PLUGIN_PROCESS=1 \
$(webcore_cppflags) \
@@ -177,6 +183,7 @@ endif

libwebkit2gtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_LIBADD += \
libjavascriptcoregtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
libWebCoreDOM.la \
libWebCoreGtk.la \
$(CAIRO_LIBS) \
$(CLUTTER_LIBS) \
@@ -282,7 +289,13 @@ $(GENSOURCES_WEBKIT2)/webkit2gtk/include/webkit2: $(libwebkit2gtkinclude_HEADERS
$(AM_V_GEN)mkdir -p $(GENSOURCES_WEBKIT2)/webkit2gtk/include \
&& ln -n -s -f ${shell pwd}/$(WebKit2)/UIProcess/API/gtk $@

BUILT_SOURCES += $(GENSOURCES_WEBKIT2)/webkit2gtk/include/webkit2
$(GENSOURCES_WEBKIT2)/webkit2extension/include/webkit2: $(libwebkit2gtkinclude_HEADERS)
$(AM_V_GEN)mkdir -p $(GENSOURCES_WEBKIT2)/webkit2extension/include \
&& ln -n -s -f ${shell pwd}/$(WebKit2)/WebProcess/InjectedBundle/API/gtk $@

BUILT_SOURCES += \
$(GENSOURCES_WEBKIT2)/webkit2extension/include/webkit2 \
$(GENSOURCES_WEBKIT2)/webkit2gtk/include/webkit2

vpath %.messages.in = \
$(WebKit2)/PluginProcess \
@@ -478,6 +491,32 @@ libWebCoreGtk2_la_CPPFLAGS = \
$(XRENDER_CFLAGS) \
$(XT_CFLAGS)

# Injected Bundle
injectedbundledir = $(libdir)/webkit2gtk-3.0/injected-bundle
injectedbundle_LTLIBRARIES = libwebkit2gtkinjectedbundle.la

libwebkit2gtkinjectedbundle_la_SOURCES = \
Source/WebKit2/WebProcess/gtk/WebGtkInjectedBundleMain.cpp

libwebkit2gtkinjectedbundle_la_LDFLAGS = \
$(no_undefined) \
-module \
-avoid-version

libwebkit2gtkinjectedbundle_la_CPPFLAGS = \
-fno-strict-aliasing \
-I$(srcdir)/Source/WebKit2/Platform \
-I$(srcdir)/Source/WebKit2/Shared \
-I$(srcdir)/Source/WebKit2/Shared/API/c \
-I$(srcdir)/Source/WebKit2/UIProcess/API/C \
-I$(srcdir)/Source/WebKit2/WebProcess/InjectedBundle \
-I$(srcdir)/Source/WebKit2/WebProcess/InjectedBundle/API/c \
-I$(top_builddir)/DerivedSources/InjectedBundle \
-I$(top_builddir)/DerivedSources/WebKit2/include \
$(global_cppflags) \
$(javascriptcore_cppflags) \
$(GLIB_CFLAGS)

# Serialize linking of the plugin process with both webkit libraries.
plugin_process_for_dep = Programs/WebKitPluginProcess
$(plugin_process_for_dep): libwebkitgtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la libwebkit2gtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la
@@ -132,6 +132,12 @@ webkit2gtk_h_api += \
$(WebKit2)/UIProcess/API/gtk/WebKitWindowProperties.h \
$(WebKit2)/UIProcess/API/gtk/webkit2.h

webkit2_web_extension_h_api += \
$(WebKit2)/WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.h \
$(WebKit2)/WebProcess/InjectedBundle/API/gtk/WebKitWebExtensionDefines.h \
$(WebKit2)/WebProcess/InjectedBundle/API/gtk/WebKitWebPage.h \
$(WebKit2)/WebProcess/InjectedBundle/API/gtk/webkit-web-extension.h

webkit2_built_sources += \
DerivedSources/WebKit2/AuthenticationManagerMessageReceiver.cpp \
DerivedSources/WebKit2/AuthenticationManagerMessages.h \
@@ -991,6 +997,8 @@ webkit2_sources += \
Source/WebKit2/WebProcess/Geolocation/GeolocationPermissionRequestManager.h \
Source/WebKit2/WebProcess/Geolocation/WebGeolocationManager.cpp \
Source/WebKit2/WebProcess/Geolocation/WebGeolocationManager.h \
Source/WebKit2/WebProcess/gtk/WebGtkExtensionManager.cpp \
Source/WebKit2/WebProcess/gtk/WebGtkExtensionManager.h \
Source/WebKit2/WebProcess/gtk/WebProcessMainGtk.cpp \
Source/WebKit2/WebProcess/gtk/WebProcessMainGtk.h \
Source/WebKit2/WebProcess/IconDatabase/WebIconDatabaseProxy.cpp \
@@ -1033,6 +1041,14 @@ webkit2_sources += \
Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleRangeHandle.h \
Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.cpp \
Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.h \
Source/WebKit2/WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp \
Source/WebKit2/WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.h \
Source/WebKit2/WebProcess/InjectedBundle/API/gtk/WebKitWebExtensionPrivate.h \
Source/WebKit2/WebProcess/InjectedBundle/API/gtk/WebKitWebExtensionDefines.h \
Source/WebKit2/WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp \
Source/WebKit2/WebProcess/InjectedBundle/API/gtk/WebKitWebPage.h \
Source/WebKit2/WebProcess/InjectedBundle/API/gtk/WebKitWebPagePrivate.h \
Source/WebKit2/WebProcess/InjectedBundle/API/gtk/webkit-web-extension.h \
Source/WebKit2/WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp \
Source/WebKit2/WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h \
Source/WebKit2/WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp \
@@ -1185,8 +1201,8 @@ webkit2_sources += \
Source/WebKit2/WebProcess/WebPage/FindController.h \
Source/WebKit2/WebProcess/WebPage/TapHighlightController.cpp \
Source/WebKit2/WebProcess/WebPage/TapHighlightController.h \
Source/WebKit2/WebProcess/WebPage/atk/WebPageAccessibilityObject.h \
Source/WebKit2/WebProcess/WebPage/atk/WebPageAccessibilityObjectAtk.cpp \
Source/WebKit2/WebProcess/WebPage/atk/WebPageAccessibilityObject.h \
Source/WebKit2/WebProcess/WebPage/atk/WebPageAccessibilityObjectAtk.cpp \
Source/WebKit2/WebProcess/WebPage/gtk/WebInspectorGtk.cpp \
Source/WebKit2/WebProcess/WebPage/gtk/WebPageGtk.cpp \
Source/WebKit2/WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp \
@@ -166,12 +166,27 @@ static void webkit_web_context_class_init(WebKitWebContextClass* webContextClass
WEBKIT_TYPE_DOWNLOAD);
}

static CString injectedBundleDirectory()
{
if (const char* bundleDirectory = g_getenv("WEBKIT_INJECTED_BUNDLE_PATH"))
return bundleDirectory;

static const char* injectedBundlePath = LIBDIR""G_DIR_SEPARATOR_S"webkit2gtk-"WEBKITGTK_API_VERSION_STRING""G_DIR_SEPARATOR_S"injected-bundle"G_DIR_SEPARATOR_S;
return injectedBundlePath;
}

static CString injectedBundleFilename()
{
GOwnPtr<char> bundleFilename(g_build_filename(injectedBundleDirectory().data(), "libwebkit2gtkinjectedbundle.so", NULL));
return bundleFilename.get();
}

static gpointer createDefaultWebContext(gpointer)
{
static GRefPtr<WebKitWebContext> webContext = adoptGRef(WEBKIT_WEB_CONTEXT(g_object_new(WEBKIT_TYPE_WEB_CONTEXT, NULL)));
WebKitWebContextPrivate* priv = webContext->priv;

priv->context = WebContext::create(String());
priv->context = WebContext::create(WebCore::filenameToString(injectedBundleFilename().data()));
priv->requestManager = webContext->priv->context->supplement<WebSoupRequestManagerProxy>();
priv->context->setCacheModel(CacheModelPrimaryWebBrowser);
priv->tlsErrorsPolicy = WEBKIT_TLS_ERRORS_POLICY_IGNORE;
@@ -1847,6 +1847,22 @@ void webkit_web_view_load_request(WebKitWebView* webView, WebKitURIRequest* requ
getPage(webView)->loadURLRequest(WebURLRequest::create(webkitURIRequestGetResourceRequest(request)).leakRef());
}

/**
* webkit_web_view_get_page_id:
* @web_view: a #WebKitWebView
*
* Get the identifier of the #WebKitWebPage corresponding to
* the #WebKitWebView
*
* Returns: the page ID of @web_view.
*/
guint64 webkit_web_view_get_page_id(WebKitWebView* webView)
{
g_return_val_if_fail(WEBKIT_IS_WEB_VIEW(webView), 0);

return getPage(webView)->pageID();
}

/**
* webkit_web_view_get_title:
* @web_view: a #WebKitWebView
@@ -261,6 +261,9 @@ webkit_web_view_stop_loading (WebKitWebView
WEBKIT_API gboolean
webkit_web_view_is_loading (WebKitWebView *web_view);

WEBKIT_API guint64
webkit_web_view_get_page_id (WebKitWebView *web_view);

WEBKIT_API const gchar *
webkit_web_view_get_title (WebKitWebView *web_view);

@@ -43,6 +43,12 @@
<xi:include href="xml/WebKitSecurityManager.xml"/>
</chapter>

<chapter>
<title>Web Extensions</title>
<xi:include href="xml/WebKitWebExtension.xml"/>
<xi:include href="xml/WebKitWebPage.xml"/>
</chapter>

<index id="index-all">
<title>Index</title>
</index>
@@ -96,6 +96,7 @@ webkit_web_view_go_back
webkit_web_view_can_go_forward
webkit_web_view_go_forward
webkit_web_view_get_title
webkit_web_view_get_page_id
webkit_web_view_reload
webkit_web_view_reload_bypass_cache
webkit_web_view_stop_loading
@@ -927,3 +928,42 @@ WEBKIT_SECURITY_MANAGER_GET_CLASS
WebKitSecurityManagerPrivate
webkit_security_manager_get_type
</SECTION>

<SECTION>
<FILE>WebKitWebExtension</FILE>
WebKitWebExtension
WebKitWebExtensionInitializeFunction
webkit_web_extension_get_page

<SUBSECTION Standard>
WebKitWebExtensionClass
WEBKIT_TYPE_WEB_EXTENSION
WEBKIT_WEB_EXTENSION
WEBKIT_IS_WEB_EXTENSION
WEBKIT_WEB_EXTENSION_CLASS
WEBKIT_IS_WEB_EXTENSION_CLASS
WEBKIT_WEB_EXTENSION_GET_CLASS

<SUBSECTION Private>
WebKitWebExtensionPrivate
webkit_web_extension_get_type
</SECTION>

<SECTION>
<FILE>WebKitWebPage</FILE>
WebKitWebPage
webkit_web_page_get_dom_document

<SUBSECTION Standard>
WebKitWebPageClass
WEBKIT_TYPE_WEB_PAGE
WEBKIT_WEB_PAGE
WEBKIT_IS_WEB_PAGE
WEBKIT_WEB_PAGE_CLASS
WEBKIT_IS_WEB_PAGE_CLASS
WEBKIT_WEB_PAGE_GET_CLASS

<SUBSECTION Private>
WebKitWebPagePrivate
webkit_web_page_get_type
</SECTION>
@@ -21,3 +21,5 @@ webkit_web_inspector_get_type
webkit_uri_scheme_request_get_type
webkit_context_menu_get_type
webkit_context_menu_item_get_type
webkit_web_extension_get_type
webkit_web_page_get_type

0 comments on commit af4cae6

Please sign in to comment.