WebKit Bugzilla
Attachment 340112 Details for
Bug 185518
: [WPE][STABLE] Remove unusable JavaScript APIs
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
[WPE][Stable] Remove unusable JavaScript APIs
bug-185518-20180510134812.patch (text/plain), 21.62 KB, created by
Michael Catanzaro
on 2018-05-10 11:48:13 PDT
(
hide
)
Description:
[WPE][Stable] Remove unusable JavaScript APIs
Filename:
MIME Type:
Creator:
Michael Catanzaro
Created:
2018-05-10 11:48:13 PDT
Size:
21.62 KB
patch
obsolete
>Subversion Revision: 231640 >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 479c57bec3628d538a381cc69fa5f73bda6fea36..3991eca7fb45778caf26a1291e7d84b5ef113d22 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,26 @@ >+2018-05-10 Michael Catanzaro <mcatanzaro@igalia.com> >+ >+ [WPE][STABLE] Remove unusable JavaScript APIs >+ https://bugs.webkit.org/show_bug.cgi?id=185518 >+ >+ There is no JSC API provided with WPE 2.20. We don't want to expose the old C API, because >+ that is going to be obsolete in 2.22. And backporting the new GObject API to this branch >+ would be inappropriate. >+ >+ This means that we need to remove WebKitJavascriptResult. >+ >+ Reviewed by Carlos Alberto Lopez Perez. >+ >+ * PlatformWPE.cmake: >+ * UIProcess/API/glib/WebKitUserContentManager.cpp: >+ * UIProcess/API/glib/WebKitWebView.cpp: >+ * UIProcess/API/wpe/WebKitUserContentManager.h: >+ * UIProcess/API/wpe/WebKitWebView.h: >+ * UIProcess/API/wpe/webkit.h: >+ * WebProcess/InjectedBundle/API/glib/WebKitFrame.cpp: >+ * WebProcess/InjectedBundle/API/wpe/WebKitFrame.h: >+ * WebProcess/InjectedBundle/API/wpe/webkit-web-extension.h: >+ > 2018-05-10 Michael Catanzaro <mcatanzaro@igalia.com> > > Unreviewed, install WebKitHitTestResult.h >diff --git a/Source/WebKit/PlatformWPE.cmake b/Source/WebKit/PlatformWPE.cmake >index 4dd10aaa6bf3e522b559f87eefe23d77bf995690..2bd08078bdbe8ed0d752f83c86924d919bba1032 100644 >--- a/Source/WebKit/PlatformWPE.cmake >+++ b/Source/WebKit/PlatformWPE.cmake >@@ -109,7 +109,6 @@ set(WPE_API_INSTALLED_HEADERS > ${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 > ${WEBKIT_DIR}/UIProcess/API/wpe/WebKitNavigationAction.h > ${WEBKIT_DIR}/UIProcess/API/wpe/WebKitNavigationPolicyDecision.h >@@ -145,7 +144,6 @@ 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 >diff --git a/Source/WebKit/UIProcess/API/glib/WebKitUserContentManager.cpp b/Source/WebKit/UIProcess/API/glib/WebKitUserContentManager.cpp >index 22832604a63cb651c52c930a93a094c4ed5b0501..243dfb83ab44ac55a2b2fe43154cf14b8da51486 100644 >--- a/Source/WebKit/UIProcess/API/glib/WebKitUserContentManager.cpp >+++ b/Source/WebKit/UIProcess/API/glib/WebKitUserContentManager.cpp >@@ -73,10 +73,13 @@ enum { > LAST_SIGNAL > }; > >+#if PLATFORM(GTK) > static guint signals[LAST_SIGNAL] = { 0, }; >+#endif > > static void webkit_user_content_manager_class_init(WebKitUserContentManagerClass* klass) > { >+#if PLATFORM(GTK) > GObjectClass* gObjectClass = G_OBJECT_CLASS(klass); > > /** >@@ -100,6 +103,7 @@ static void webkit_user_content_manager_class_init(WebKitUserContentManagerClass > g_cclosure_marshal_VOID__BOXED, > G_TYPE_NONE, 1, > WEBKIT_TYPE_JAVASCRIPT_RESULT); >+#endif > } > > /** >@@ -180,6 +184,7 @@ void webkit_user_content_manager_remove_all_scripts(WebKitUserContentManager* ma > manager->priv->userContentController->removeAllUserScripts(); > } > >+#if PLATFORM(GTK) > class ScriptMessageClientGtk final : public WebScriptMessageHandler::Client { > public: > ScriptMessageClientGtk(WebKitUserContentManager* manager, const char* handlerName) >@@ -263,6 +268,7 @@ void webkit_user_content_manager_unregister_script_message_handler(WebKitUserCon > g_return_if_fail(name); > manager->priv->userContentController->removeUserMessageHandlerForName(String::fromUTF8(name), API::UserContentWorld::normalWorld()); > } >+#endif > > WebUserContentControllerProxy* webkitUserContentManagerGetUserContentControllerProxy(WebKitUserContentManager* manager) > { >diff --git a/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp b/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp >index 8215e222814182f2bd5e7b8c282a8d8b5481a124..5e858ce62f1f797d0d1b051ee960265f1b7f6788 100644 >--- a/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp >+++ b/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp >@@ -369,11 +369,6 @@ private: > webkitWebViewHandleDownloadRequest(m_webView, &downloadProxy); > } > >- JSGlobalContextRef javascriptGlobalContext() override >- { >- return webkit_web_view_get_javascript_global_context(m_webView); >- } >- > WebKitWebView* m_webView; > }; > #endif >@@ -3254,6 +3249,7 @@ WebKitFindController* webkit_web_view_get_find_controller(WebKitWebView* webView > return webView->priv->findController.get(); > } > >+#if PLATFORM(GTK) > /** > * webkit_web_view_get_javascript_global_context: > * @web_view: a #WebKitWebView >@@ -3474,6 +3470,7 @@ WebKitJavascriptResult* webkit_web_view_run_javascript_from_gresource_finish(Web > > return static_cast<WebKitJavascriptResult*>(g_task_propagate_pointer(G_TASK(result), error)); > } >+#endif > > /** > * webkit_web_view_get_main_resource: >diff --git a/Source/WebKit/UIProcess/API/wpe/WebKitUserContentManager.h b/Source/WebKit/UIProcess/API/wpe/WebKitUserContentManager.h >index 27a27c83a4f70e53479b5f74aea587296494ddab..cef8cd41bccf7e1eb5c85edcc7eeead59f89553f 100644 >--- a/Source/WebKit/UIProcess/API/wpe/WebKitUserContentManager.h >+++ b/Source/WebKit/UIProcess/API/wpe/WebKitUserContentManager.h >@@ -71,13 +71,6 @@ webkit_user_content_manager_add_style_sheet (WebKitUserContent > WEBKIT_API void > webkit_user_content_manager_remove_all_style_sheets (WebKitUserContentManager *manager); > >-WEBKIT_API gboolean >-webkit_user_content_manager_register_script_message_handler (WebKitUserContentManager *manager, >- const gchar *name); >-WEBKIT_API void >-webkit_user_content_manager_unregister_script_message_handler (WebKitUserContentManager *manager, >- const gchar *name); >- > WEBKIT_API void > webkit_user_content_manager_add_script (WebKitUserContentManager *manager, > WebKitUserScript *script); >diff --git a/Source/WebKit/UIProcess/API/wpe/WebKitWebView.h b/Source/WebKit/UIProcess/API/wpe/WebKitWebView.h >index fbb4f809d920f656486e4fa6ec610fdba98c278a..49a98e25c409bf97ffaca697e8a19b8d8813c371 100644 >--- a/Source/WebKit/UIProcess/API/wpe/WebKitWebView.h >+++ b/Source/WebKit/UIProcess/API/wpe/WebKitWebView.h >@@ -28,7 +28,6 @@ > #ifndef WebKitWebView_h > #define WebKitWebView_h > >-#include <JavaScriptCore/JSBase.h> > #include <wpe/WebKitAuthenticationRequest.h> > #include <wpe/WebKitBackForwardList.h> > #include <wpe/WebKitContextMenu.h> >@@ -38,7 +37,6 @@ > #include <wpe/WebKitFindController.h> > #include <wpe/WebKitFormSubmissionRequest.h> > #include <wpe/WebKitHitTestResult.h> >-#include <wpe/WebKitJavascriptResult.h> > #include <wpe/WebKitNavigationAction.h> > #include <wpe/WebKitNotification.h> > #include <wpe/WebKitPermissionRequest.h> >@@ -400,32 +398,6 @@ webkit_web_view_execute_editing_command_with_argument(WebKitWebView > WEBKIT_API WebKitFindController * > webkit_web_view_get_find_controller (WebKitWebView *web_view); > >-WEBKIT_API JSGlobalContextRef >-webkit_web_view_get_javascript_global_context (WebKitWebView *web_view); >- >-WEBKIT_API void >-webkit_web_view_run_javascript (WebKitWebView *web_view, >- const gchar *script, >- GCancellable *cancellable, >- GAsyncReadyCallback callback, >- gpointer user_data); >-WEBKIT_API WebKitJavascriptResult * >-webkit_web_view_run_javascript_finish (WebKitWebView *web_view, >- GAsyncResult *result, >- GError **error); >- >-WEBKIT_API void >-webkit_web_view_run_javascript_from_gresource (WebKitWebView *web_view, >- const gchar *resource, >- GCancellable *cancellable, >- GAsyncReadyCallback callback, >- gpointer user_data); >- >-WEBKIT_API WebKitJavascriptResult * >-webkit_web_view_run_javascript_from_gresource_finish (WebKitWebView *web_view, >- GAsyncResult *result, >- GError **error); >- > WEBKIT_API WebKitWebResource * > webkit_web_view_get_main_resource (WebKitWebView *web_view); > >diff --git a/Source/WebKit/UIProcess/API/wpe/webkit.h b/Source/WebKit/UIProcess/API/wpe/webkit.h >index 943ade2afa819b9e8cb0b9f7eb41a758a1e3bc1b..e26845203190ecf2645bc07dbb2852c70bc6f311 100644 >--- a/Source/WebKit/UIProcess/API/wpe/webkit.h >+++ b/Source/WebKit/UIProcess/API/wpe/webkit.h >@@ -49,7 +49,6 @@ > #include <wpe/WebKitGeolocationPermissionRequest.h> > #include <wpe/WebKitHitTestResult.h> > #include <wpe/WebKitInstallMissingMediaPluginsPermissionRequest.h> >-#include <wpe/WebKitJavascriptResult.h> > #include <wpe/WebKitMimeInfo.h> > #include <wpe/WebKitNavigationAction.h> > #include <wpe/WebKitNavigationPolicyDecision.h> >diff --git a/Source/WebKit/WebProcess/InjectedBundle/API/glib/WebKitFrame.cpp b/Source/WebKit/WebProcess/InjectedBundle/API/glib/WebKitFrame.cpp >index 1953333adaedab22c04a5a01d488fc173ade8a3d..aacda80ebafe4344f7e237d1ad419735f34acce5 100644 >--- a/Source/WebKit/WebProcess/InjectedBundle/API/glib/WebKitFrame.cpp >+++ b/Source/WebKit/WebProcess/InjectedBundle/API/glib/WebKitFrame.cpp >@@ -90,6 +90,7 @@ const gchar* webkit_frame_get_uri(WebKitFrame* frame) > return frame->priv->uri.data(); > } > >+#if PLATFORM(GTK) > /** > * webkit_frame_get_javascript_global_context: > * @frame: a #WebKitFrame >@@ -126,3 +127,4 @@ JSGlobalContextRef webkit_frame_get_javascript_context_for_script_world(WebKitFr > > return frame->priv->webFrame->jsContextForWorld(webkitScriptWorldGetInjectedBundleScriptWorld(world)); > } >+#endif >diff --git a/Source/WebKit/WebProcess/InjectedBundle/API/wpe/WebKitFrame.h b/Source/WebKit/WebProcess/InjectedBundle/API/wpe/WebKitFrame.h >index 23da0ae4ca479f2460b8887f3a5771662cccf115..950dcd57492b0539a5eb8bf414cb161e74edc204 100644 >--- a/Source/WebKit/WebProcess/InjectedBundle/API/wpe/WebKitFrame.h >+++ b/Source/WebKit/WebProcess/InjectedBundle/API/wpe/WebKitFrame.h >@@ -24,10 +24,8 @@ > #ifndef WebKitFrame_h > #define WebKitFrame_h > >-#include <JavaScriptCore/JSBase.h> > #include <glib-object.h> > #include <wpe/WebKitDefines.h> >-#include <wpe/WebKitScriptWorld.h> > > G_BEGIN_DECLS > >@@ -61,13 +59,6 @@ webkit_frame_is_main_frame (WebKitFrame *frame); > WEBKIT_API const gchar * > webkit_frame_get_uri (WebKitFrame *frame); > >-WEBKIT_API JSGlobalContextRef >-webkit_frame_get_javascript_global_context (WebKitFrame *frame); >- >-WEBKIT_API JSGlobalContextRef >-webkit_frame_get_javascript_context_for_script_world (WebKitFrame *frame, >- WebKitScriptWorld *world); >- > G_END_DECLS > > #endif >diff --git a/Source/WebKit/WebProcess/InjectedBundle/API/wpe/webkit-web-extension.h b/Source/WebKit/WebProcess/InjectedBundle/API/wpe/webkit-web-extension.h >index 6f06acd2ab0b9de2e3f2ccd5d1893ee8a70a8bbc..2722db7a70f93c6f10114bb403cf3066aab4dc91 100644 >--- a/Source/WebKit/WebProcess/InjectedBundle/API/wpe/webkit-web-extension.h >+++ b/Source/WebKit/WebProcess/InjectedBundle/API/wpe/webkit-web-extension.h >@@ -31,7 +31,6 @@ > #include <wpe/WebKitContextMenuActions.h> > #include <wpe/WebKitContextMenuItem.h> > #include <wpe/WebKitFrame.h> >-#include <wpe/WebKitScriptWorld.h> > #include <wpe/WebKitURIRequest.h> > #include <wpe/WebKitURIResponse.h> > #include <wpe/WebKitWebEditor.h> >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index 9b9374663c1f93e9bf0242c63e0b89b8a9158175..11b80963c90c206ad62e650f3b5ae577fd2efe74 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,19 @@ >+2018-05-10 Michael Catanzaro <mcatanzaro@igalia.com> >+ >+ [WPE][STABLE] Remove unusable JavaScript APIs >+ https://bugs.webkit.org/show_bug.cgi?id=185518 >+ >+ Sort of reviewed by Carlos Alberto Lopez Perez. Not really. He didn't really approve the >+ part where I remove half the API tests. He just told me to make it build, and that I did. >+ >+ The tests live on in trunk, of course. >+ >+ * TestWebKitAPI/glib/CMakeLists.txt: >+ * TestWebKitAPI/glib/WebKitGLib/WebViewTest.cpp: >+ (WebViewTest::~WebViewTest): >+ (WebViewTest::getSnapshotAndWaitUntilReady): >+ * TestWebKitAPI/glib/WebKitGLib/WebViewTest.h: >+ > 2018-05-09 Michael Catanzaro <mcatanzaro@igalia.com> > > Unreviewed. Update OptionsWPE.cmake and NEWS for 2.19.92 release. >diff --git a/Tools/TestWebKitAPI/glib/CMakeLists.txt b/Tools/TestWebKitAPI/glib/CMakeLists.txt >index d7b10d0bf0e31082aac6870c3ac7d8f34efc7179..c22d91670ebeb1db485ca37cd139aa6a30083e60 100644 >--- a/Tools/TestWebKitAPI/glib/CMakeLists.txt >+++ b/Tools/TestWebKitAPI/glib/CMakeLists.txt >@@ -62,8 +62,12 @@ macro(ADD_WK2_TEST test_name) > add_executable(${test_name} ${ARGN}) > add_dependencies(${test_name} > test-gresource-bundle >- WebExtensionTest > ) >+ if (PORT STREQUAL "GTK") >+ add_dependencies(${test_name} >+ WebExtensionTest >+ ) >+ endif () > set_target_properties(${test_name} PROPERTIES > RUNTIME_OUTPUT_DIRECTORY ${TEST_BINARY_DIR} > ) >@@ -112,32 +116,32 @@ add_custom_target(test-gresource-bundle > DEPENDS ${TEST_RESOURCES_DIR}/webkitglib-tests-resources.gresource > ) > >-ADD_WK2_TEST_WEB_EXTENSION(WebExtensionTest ${TOOLS_DIR}/TestWebKitAPI/Tests/WebKitGLib/WebExtensionTest.cpp) >-ADD_WK2_TEST_WEB_EXTENSION(WebProcessTest ${WebKitGLibAPIWebProcessTests}) >- > ADD_WK2_TEST(TestAuthentication ${TOOLS_DIR}/TestWebKitAPI/Tests/WebKitGLib/TestAuthentication.cpp) > ADD_WK2_TEST(TestAutomationSession ${TOOLS_DIR}/TestWebKitAPI/Tests/WebKitGLib/TestAutomationSession.cpp) >-ADD_WK2_TEST(TestBackForwardList ${TOOLS_DIR}/TestWebKitAPI/Tests/WebKitGLib/TestBackForwardList.cpp) > ADD_WK2_TEST(TestDownloads ${TOOLS_DIR}/TestWebKitAPI/Tests/WebKitGLib/TestDownloads.cpp) > ADD_WK2_TEST(TestWebKitFaviconDatabase ${TOOLS_DIR}/TestWebKitAPI/Tests/WebKitGLib/TestWebKitFaviconDatabase.cpp) > ADD_WK2_TEST(TestWebKitFindController ${TOOLS_DIR}/TestWebKitAPI/Tests/WebKitGLib/TestWebKitFindController.cpp) >-ADD_WK2_TEST(TestFrame ${TOOLS_DIR}/TestWebKitAPI/Tests/WebKitGLib/TestFrame.cpp) >-ADD_WK2_TEST(TestLoaderClient ${TOOLS_DIR}/TestWebKitAPI/Tests/WebKitGLib/TestLoaderClient.cpp) > ADD_WK2_TEST(TestMultiprocess ${TOOLS_DIR}/TestWebKitAPI/Tests/WebKitGLib/TestMultiprocess.cpp) >-ADD_WK2_TEST(TestResources ${TOOLS_DIR}/TestWebKitAPI/Tests/WebKitGLib/TestResources.cpp) >-ADD_WK2_TEST(TestSSL ${TOOLS_DIR}/TestWebKitAPI/Tests/WebKitGLib/TestSSL.cpp) >-ADD_WK2_TEST(TestUIClient ${TOOLS_DIR}/TestWebKitAPI/Tests/WebKitGLib/TestUIClient.cpp) >-ADD_WK2_TEST(TestWebExtensions ${TOOLS_DIR}/TestWebKitAPI/Tests/WebKitGLib/TestWebExtensions.cpp) > ADD_WK2_TEST(TestWebKitPolicyClient ${TOOLS_DIR}/TestWebKitAPI/Tests/WebKitGLib/TestWebKitPolicyClient.cpp) > ADD_WK2_TEST(TestWebKitSecurityOrigin ${TOOLS_DIR}/TestWebKitAPI/Tests/WebKitGLib/TestWebKitSecurityOrigin.cpp) > ADD_WK2_TEST(TestWebKitSettings ${TOOLS_DIR}/TestWebKitAPI/Tests/WebKitGLib/TestWebKitSettings.cpp) >-ADD_WK2_TEST(TestWebKitWebContext ${TOOLS_DIR}/TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebContext.cpp) >-ADD_WK2_TEST(TestWebKitWebView ${TOOLS_DIR}/TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp) >-ADD_WK2_TEST(TestWebKitUserContentManager ${TOOLS_DIR}/TestWebKitAPI/Tests/WebKitGLib/TestWebKitUserContentManager.cpp) >-ADD_WK2_TEST(TestWebsiteData ${TOOLS_DIR}/TestWebKitAPI/Tests/WebKitGLib/TestWebsiteData.cpp) >-ADD_WK2_TEST(TestConsoleMessage ${TOOLS_DIR}/TestWebKitAPI/Tests/WebKitGLib/TestConsoleMessage.cpp) > > # FIXME: Enable for WPE > if (PORT STREQUAL "GTK") >+ ADD_WK2_TEST(TestBackForwardList ${TOOLS_DIR}/TestWebKitAPI/Tests/WebKitGLib/TestBackForwardList.cpp) >+ ADD_WK2_TEST(TestConsoleMessage ${TOOLS_DIR}/TestWebKitAPI/Tests/WebKitGLib/TestConsoleMessage.cpp) > ADD_WK2_TEST(TestCookieManager ${TOOLS_DIR}/TestWebKitAPI/Tests/WebKitGLib/TestCookieManager.cpp) >+ ADD_WK2_TEST(TestFrame ${TOOLS_DIR}/TestWebKitAPI/Tests/WebKitGLib/TestFrame.cpp) >+ ADD_WK2_TEST(TestLoaderClient ${TOOLS_DIR}/TestWebKitAPI/Tests/WebKitGLib/TestLoaderClient.cpp) >+ ADD_WK2_TEST(TestResources ${TOOLS_DIR}/TestWebKitAPI/Tests/WebKitGLib/TestResources.cpp) >+ ADD_WK2_TEST(TestSSL ${TOOLS_DIR}/TestWebKitAPI/Tests/WebKitGLib/TestSSL.cpp) >+ ADD_WK2_TEST(TestUIClient ${TOOLS_DIR}/TestWebKitAPI/Tests/WebKitGLib/TestUIClient.cpp) >+ ADD_WK2_TEST(TestWebExtensions ${TOOLS_DIR}/TestWebKitAPI/Tests/WebKitGLib/TestWebExtensions.cpp) >+ ADD_WK2_TEST(TestWebKitUserContentManager ${TOOLS_DIR}/TestWebKitAPI/Tests/WebKitGLib/TestWebKitUserContentManager.cpp) >+ ADD_WK2_TEST(TestWebKitWebContext ${TOOLS_DIR}/TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebContext.cpp) >+ ADD_WK2_TEST(TestWebKitWebView ${TOOLS_DIR}/TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp) >+ ADD_WK2_TEST(TestWebsiteData ${TOOLS_DIR}/TestWebKitAPI/Tests/WebKitGLib/TestWebsiteData.cpp) >+ >+ ADD_WK2_TEST_WEB_EXTENSION(WebExtensionTest ${TOOLS_DIR}/TestWebKitAPI/Tests/WebKitGLib/WebExtensionTest.cpp) >+ ADD_WK2_TEST_WEB_EXTENSION(WebProcessTest ${WebKitGLibAPIWebProcessTests}) > endif () >diff --git a/Tools/TestWebKitAPI/glib/WebKitGLib/WebViewTest.cpp b/Tools/TestWebKitAPI/glib/WebKitGLib/WebViewTest.cpp >index 4afd1c6bd312fb85d504e90a09911e8034a75cb3..4f0012b870d9546c55aa11065c06b5b80edb8b2c 100644 >--- a/Tools/TestWebKitAPI/glib/WebKitGLib/WebViewTest.cpp >+++ b/Tools/TestWebKitAPI/glib/WebKitGLib/WebViewTest.cpp >@@ -37,8 +37,10 @@ WebViewTest::WebViewTest() > WebViewTest::~WebViewTest() > { > platformDestroy(); >+#if PLATFORM(GTK) > if (m_javascriptResult) > webkit_javascript_result_unref(m_javascriptResult); >+#endif > if (m_surface) > cairo_surface_destroy(m_surface); > g_object_unref(m_webView); >@@ -259,6 +261,7 @@ const char* WebViewTest::mainResourceData(size_t& mainResourceDataSize) > return m_resourceData.get(); > } > >+#if PLATFORM(GTK) > static void runJavaScriptReadyCallback(GObject*, GAsyncResult* result, WebViewTest* test) > { > test->m_javascriptResult = webkit_web_view_run_javascript_finish(test->m_webView, result, test->m_javascriptError); >@@ -358,7 +361,6 @@ bool WebViewTest::javascriptResultIsUndefined(WebKitJavascriptResult* javascript > return JSValueIsUndefined(context, value); > } > >-#if PLATFORM(GTK) > static void onSnapshotReady(WebKitWebView* web_view, GAsyncResult* res, WebViewTest* test) > { > GUniqueOutPtr<GError> error; >@@ -378,7 +380,6 @@ cairo_surface_t* WebViewTest::getSnapshotAndWaitUntilReady(WebKitSnapshotRegion > g_main_loop_run(m_mainLoop); > return m_surface; > } >-#endif > > bool WebViewTest::runWebProcessTest(const char* suiteName, const char* testName, const char* contents, const char* contentType) > { >@@ -399,3 +400,4 @@ bool WebViewTest::runWebProcessTest(const char* suiteName, const char* testName, > waitUntilLoadFinished(); > return javascriptResultToBoolean(javascriptResult); > } >+#endif >diff --git a/Tools/TestWebKitAPI/glib/WebKitGLib/WebViewTest.h b/Tools/TestWebKitAPI/glib/WebKitGLib/WebViewTest.h >index 96d2331cd7889fbeb81e872fa562e2bb0195c2d0..b817b8aa81b330b2236b7a518adbd4cbceefcfd7 100644 >--- a/Tools/TestWebKitAPI/glib/WebKitGLib/WebViewTest.h >+++ b/Tools/TestWebKitAPI/glib/WebKitGLib/WebViewTest.h >@@ -67,7 +67,6 @@ public: > void showInWindow(GtkWindowType = GTK_WINDOW_POPUP); > void showInWindowAndWaitUntilMapped(GtkWindowType = GTK_WINDOW_POPUP, int width = 0, int height = 0); > void emitPopupMenuSignal(); >-#endif > > WebKitJavascriptResult* runJavaScriptAndWaitUntilFinished(const char* javascript, GError**); > WebKitJavascriptResult* runJavaScriptFromGResourceAndWaitUntilFinished(const char* resource, GError**); >@@ -79,11 +78,10 @@ public: > static bool javascriptResultIsNull(WebKitJavascriptResult*); > static bool javascriptResultIsUndefined(WebKitJavascriptResult*); > >-#if PLATFORM(GTK) > cairo_surface_t* getSnapshotAndWaitUntilReady(WebKitSnapshotRegion, WebKitSnapshotOptions); >-#endif > > bool runWebProcessTest(const char* suiteName, const char* testName, const char* contents = nullptr, const char* contentType = nullptr); >+#endif > > // Prohibit overrides because this is called when the web view is created > // in our constructor, before a derived class's vtable is ready. >@@ -96,7 +94,9 @@ public: > GMainLoop* m_mainLoop; > CString m_activeURI; > CString m_expectedTitle; >+#if PLATFORM(GTK) > WebKitJavascriptResult* m_javascriptResult { nullptr }; >+#endif > GError** m_javascriptError { nullptr }; > GUniquePtr<char> m_resourceData { nullptr }; > size_t m_resourceDataSize { 0 };
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 185518
:
340105
| 340112