Title: [231650] releases/WebKitGTK/webkit-2.20
Revision
231650
Author
[email protected]
Date
2018-05-10 11:48:26 -0700 (Thu, 10 May 2018)

Log Message

[WPE][Stable] Remove unusable _javascript_ APIs

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.

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.20/Source/WebKit/ChangeLog (231649 => 231650)


--- releases/WebKitGTK/webkit-2.20/Source/WebKit/ChangeLog	2018-05-10 18:36:57 UTC (rev 231649)
+++ releases/WebKitGTK/webkit-2.20/Source/WebKit/ChangeLog	2018-05-10 18:48:26 UTC (rev 231650)
@@ -1,5 +1,28 @@
 2018-05-10  Michael Catanzaro  <[email protected]>
 
+        [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  <[email protected]>
+
         Unreviewed, install WebKitHitTestResult.h
 
         Not sure what I was thinking yesterday, but I removed this required header. I did not notice

Modified: releases/WebKitGTK/webkit-2.20/Source/WebKit/PlatformWPE.cmake (231649 => 231650)


--- releases/WebKitGTK/webkit-2.20/Source/WebKit/PlatformWPE.cmake	2018-05-10 18:36:57 UTC (rev 231649)
+++ releases/WebKitGTK/webkit-2.20/Source/WebKit/PlatformWPE.cmake	2018-05-10 18:48:26 UTC (rev 231650)
@@ -109,7 +109,6 @@
     ${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 @@
     ${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

Modified: releases/WebKitGTK/webkit-2.20/Source/WebKit/UIProcess/API/glib/WebKitUserContentManager.cpp (231649 => 231650)


--- releases/WebKitGTK/webkit-2.20/Source/WebKit/UIProcess/API/glib/WebKitUserContentManager.cpp	2018-05-10 18:36:57 UTC (rev 231649)
+++ releases/WebKitGTK/webkit-2.20/Source/WebKit/UIProcess/API/glib/WebKitUserContentManager.cpp	2018-05-10 18:48:26 UTC (rev 231650)
@@ -73,10 +73,13 @@
     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 @@
             g_cclosure_marshal_VOID__BOXED,
             G_TYPE_NONE, 1,
             WEBKIT_TYPE_JAVASCRIPT_RESULT);
+#endif
 }
 
 /**
@@ -180,6 +184,7 @@
     manager->priv->userContentController->removeAllUserScripts();
 }
 
+#if PLATFORM(GTK)
 class ScriptMessageClientGtk final : public WebScriptMessageHandler::Client {
 public:
     ScriptMessageClientGtk(WebKitUserContentManager* manager, const char* handlerName)
@@ -263,6 +268,7 @@
     g_return_if_fail(name);
     manager->priv->userContentController->removeUserMessageHandlerForName(String::fromUTF8(name), API::UserContentWorld::normalWorld());
 }
+#endif
 
 WebUserContentControllerProxy* webkitUserContentManagerGetUserContentControllerProxy(WebKitUserContentManager* manager)
 {

Modified: releases/WebKitGTK/webkit-2.20/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp (231649 => 231650)


--- releases/WebKitGTK/webkit-2.20/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp	2018-05-10 18:36:57 UTC (rev 231649)
+++ releases/WebKitGTK/webkit-2.20/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp	2018-05-10 18:48:26 UTC (rev 231650)
@@ -369,11 +369,6 @@
         webkitWebViewHandleDownloadRequest(m_webView, &downloadProxy);
     }
 
-    JSGlobalContextRef _javascript_GlobalContext() override
-    {
-        return webkit_web_view_get_javascript_global_context(m_webView);
-    }
-
     WebKitWebView* m_webView;
 };
 #endif
@@ -3254,6 +3249,7 @@
     return webView->priv->findController.get();
 }
 
+#if PLATFORM(GTK)
 /**
  * webkit_web_view_get_javascript_global_context:
  * @web_view: a #WebKitWebView
@@ -3474,6 +3470,7 @@
 
     return static_cast<WebKitJavascriptResult*>(g_task_propagate_pointer(G_TASK(result), error));
 }
+#endif
 
 /**
  * webkit_web_view_get_main_resource:

Modified: releases/WebKitGTK/webkit-2.20/Source/WebKit/UIProcess/API/wpe/WebKitUserContentManager.h (231649 => 231650)


--- releases/WebKitGTK/webkit-2.20/Source/WebKit/UIProcess/API/wpe/WebKitUserContentManager.h	2018-05-10 18:36:57 UTC (rev 231649)
+++ releases/WebKitGTK/webkit-2.20/Source/WebKit/UIProcess/API/wpe/WebKitUserContentManager.h	2018-05-10 18:48:26 UTC (rev 231650)
@@ -71,14 +71,7 @@
 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);
 

Modified: releases/WebKitGTK/webkit-2.20/Source/WebKit/UIProcess/API/wpe/WebKitWebView.h (231649 => 231650)


--- releases/WebKitGTK/webkit-2.20/Source/WebKit/UIProcess/API/wpe/WebKitWebView.h	2018-05-10 18:36:57 UTC (rev 231649)
+++ releases/WebKitGTK/webkit-2.20/Source/WebKit/UIProcess/API/wpe/WebKitWebView.h	2018-05-10 18:48:26 UTC (rev 231650)
@@ -28,7 +28,6 @@
 #ifndef WebKitWebView_h
 #define WebKitWebView_h
 
-#include <_javascript_Core/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_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);
 

Modified: releases/WebKitGTK/webkit-2.20/Source/WebKit/UIProcess/API/wpe/webkit.h (231649 => 231650)


--- releases/WebKitGTK/webkit-2.20/Source/WebKit/UIProcess/API/wpe/webkit.h	2018-05-10 18:36:57 UTC (rev 231649)
+++ releases/WebKitGTK/webkit-2.20/Source/WebKit/UIProcess/API/wpe/webkit.h	2018-05-10 18:48:26 UTC (rev 231650)
@@ -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>

Modified: releases/WebKitGTK/webkit-2.20/Source/WebKit/WebProcess/InjectedBundle/API/glib/WebKitFrame.cpp (231649 => 231650)


--- releases/WebKitGTK/webkit-2.20/Source/WebKit/WebProcess/InjectedBundle/API/glib/WebKitFrame.cpp	2018-05-10 18:36:57 UTC (rev 231649)
+++ releases/WebKitGTK/webkit-2.20/Source/WebKit/WebProcess/InjectedBundle/API/glib/WebKitFrame.cpp	2018-05-10 18:48:26 UTC (rev 231650)
@@ -90,6 +90,7 @@
     return frame->priv->uri.data();
 }
 
+#if PLATFORM(GTK)
 /**
  * webkit_frame_get_javascript_global_context:
  * @frame: a #WebKitFrame
@@ -126,3 +127,4 @@
 
     return frame->priv->webFrame->jsContextForWorld(webkitScriptWorldGetInjectedBundleScriptWorld(world));
 }
+#endif

Modified: releases/WebKitGTK/webkit-2.20/Source/WebKit/WebProcess/InjectedBundle/API/wpe/WebKitFrame.h (231649 => 231650)


--- releases/WebKitGTK/webkit-2.20/Source/WebKit/WebProcess/InjectedBundle/API/wpe/WebKitFrame.h	2018-05-10 18:36:57 UTC (rev 231649)
+++ releases/WebKitGTK/webkit-2.20/Source/WebKit/WebProcess/InjectedBundle/API/wpe/WebKitFrame.h	2018-05-10 18:48:26 UTC (rev 231650)
@@ -24,10 +24,8 @@
 #ifndef WebKitFrame_h
 #define WebKitFrame_h
 
-#include <_javascript_Core/JSBase.h>
 #include <glib-object.h>
 #include <wpe/WebKitDefines.h>
-#include <wpe/WebKitScriptWorld.h>
 
 G_BEGIN_DECLS
 
@@ -61,13 +59,6 @@
 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

Modified: releases/WebKitGTK/webkit-2.20/Source/WebKit/WebProcess/InjectedBundle/API/wpe/webkit-web-extension.h (231649 => 231650)


--- releases/WebKitGTK/webkit-2.20/Source/WebKit/WebProcess/InjectedBundle/API/wpe/webkit-web-extension.h	2018-05-10 18:36:57 UTC (rev 231649)
+++ releases/WebKitGTK/webkit-2.20/Source/WebKit/WebProcess/InjectedBundle/API/wpe/webkit-web-extension.h	2018-05-10 18:48:26 UTC (rev 231650)
@@ -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>

Modified: releases/WebKitGTK/webkit-2.20/Tools/ChangeLog (231649 => 231650)


--- releases/WebKitGTK/webkit-2.20/Tools/ChangeLog	2018-05-10 18:36:57 UTC (rev 231649)
+++ releases/WebKitGTK/webkit-2.20/Tools/ChangeLog	2018-05-10 18:48:26 UTC (rev 231650)
@@ -1,3 +1,19 @@
+2018-05-10  Michael Catanzaro  <[email protected]>
+
+        [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  <[email protected]>
 
         Unreviewed. Update OptionsWPE.cmake and NEWS for 2.19.92 release.

Modified: releases/WebKitGTK/webkit-2.20/Tools/TestWebKitAPI/glib/CMakeLists.txt (231649 => 231650)


--- releases/WebKitGTK/webkit-2.20/Tools/TestWebKitAPI/glib/CMakeLists.txt	2018-05-10 18:36:57 UTC (rev 231649)
+++ releases/WebKitGTK/webkit-2.20/Tools/TestWebKitAPI/glib/CMakeLists.txt	2018-05-10 18:48:26 UTC (rev 231650)
@@ -62,8 +62,12 @@
     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 @@
     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 ()

Modified: releases/WebKitGTK/webkit-2.20/Tools/TestWebKitAPI/glib/WebKitGLib/WebViewTest.cpp (231649 => 231650)


--- releases/WebKitGTK/webkit-2.20/Tools/TestWebKitAPI/glib/WebKitGLib/WebViewTest.cpp	2018-05-10 18:36:57 UTC (rev 231649)
+++ releases/WebKitGTK/webkit-2.20/Tools/TestWebKitAPI/glib/WebKitGLib/WebViewTest.cpp	2018-05-10 18:48:26 UTC (rev 231650)
@@ -37,8 +37,10 @@
 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 @@
     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 @@
     return JSValueIsUndefined(context, value);
 }
 
-#if PLATFORM(GTK)
 static void onSnapshotReady(WebKitWebView* web_view, GAsyncResult* res, WebViewTest* test)
 {
     GUniqueOutPtr<GError> error;
@@ -378,7 +380,6 @@
     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 @@
     waitUntilLoadFinished();
     return _javascript_ResultToBoolean(_javascript_Result);
 }
+#endif

Modified: releases/WebKitGTK/webkit-2.20/Tools/TestWebKitAPI/glib/WebKitGLib/WebViewTest.h (231649 => 231650)


--- releases/WebKitGTK/webkit-2.20/Tools/TestWebKitAPI/glib/WebKitGLib/WebViewTest.h	2018-05-10 18:36:57 UTC (rev 231649)
+++ releases/WebKitGTK/webkit-2.20/Tools/TestWebKitAPI/glib/WebKitGLib/WebViewTest.h	2018-05-10 18:48:26 UTC (rev 231650)
@@ -67,7 +67,6 @@
     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 @@
     static bool _javascript_ResultIsNull(WebKitJavascriptResult*);
     static bool _javascript_ResultIsUndefined(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 @@
     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 };
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to