Title: [165276] trunk
Revision
165276
Author
[email protected]
Date
2014-03-07 12:20:17 -0800 (Fri, 07 Mar 2014)

Log Message

Replace setSystemWebGLLoadPolicy API with methods to query for WebGL blocking policy.
https://bugs.webkit.org/show_bug.cgi?id=129873.

Reviewed by Dean Jackson.

Remove setSystemWebGLLoadPolicy API.
* UIProcess/API/APILoaderClient.h:
(API::LoaderClient::resolveWebGLLoadPolicy):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageLoaderClient):
* UIProcess/API/C/WKPageLoaderClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::resolveWebGLPolicyForURL):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::webGLPolicyForURL):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::createWebViewWithOptions):

Add API to directly query the WebGL blocking policies from WKSI.
* UIProcess/API/C/mac/WKContextPrivateMac.h:
* UIProcess/API/C/mac/WKContextPrivateMac.mm:
(WKContextShouldBlockWebGL):
(WKContextShouldSuggestBlockWebGL):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (165275 => 165276)


--- trunk/Source/WebKit2/ChangeLog	2014-03-07 20:19:28 UTC (rev 165275)
+++ trunk/Source/WebKit2/ChangeLog	2014-03-07 20:20:17 UTC (rev 165276)
@@ -1,3 +1,29 @@
+2014-03-07  Roger Fong  <[email protected]>
+
+        Replace setSystemWebGLLoadPolicy API with methods to query for WebGL blocking policy.
+        https://bugs.webkit.org/show_bug.cgi?id=129873.
+
+        Reviewed by Dean Jackson.
+
+        Remove setSystemWebGLLoadPolicy API.
+        * UIProcess/API/APILoaderClient.h:
+        (API::LoaderClient::resolveWebGLLoadPolicy):
+        * UIProcess/API/C/WKPage.cpp:
+        (WKPageSetPageLoaderClient):
+        * UIProcess/API/C/WKPageLoaderClient.h:
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::resolveWebGLPolicyForURL):
+        * UIProcess/WebPageProxy.h:
+        * UIProcess/WebPageProxy.messages.in:
+        * WebProcess/WebPage/mac/WebPageMac.mm:
+        (WebKit::WebPage::webGLPolicyForURL):
+
+        Add API to directly query the WebGL blocking policies from WKSI.
+        * UIProcess/API/C/mac/WKContextPrivateMac.h:
+        * UIProcess/API/C/mac/WKContextPrivateMac.mm:
+        (WKContextShouldBlockWebGL):
+        (WKContextShouldSuggestBlockWebGL):
+
 2014-03-07  Eric Carlson  <[email protected]>
 
         Initialize new WKSI functions for WebKit2

Modified: trunk/Source/WebKit2/UIProcess/API/APILoaderClient.h (165275 => 165276)


--- trunk/Source/WebKit2/UIProcess/API/APILoaderClient.h	2014-03-07 20:19:28 UTC (rev 165275)
+++ trunk/Source/WebKit2/UIProcess/API/APILoaderClient.h	2014-03-07 20:20:17 UTC (rev 165276)
@@ -99,7 +99,6 @@
 #if ENABLE(WEBGL)
     virtual WebCore::WebGLLoadPolicy webGLLoadPolicy(WebKit::WebPageProxy*, const WTF::String&) const { return WebCore::WebGLLoadPolicy::WebGLAllowCreation; }
     virtual WebCore::WebGLLoadPolicy resolveWebGLLoadPolicy(WebKit::WebPageProxy*, const WTF::String&) const { return WebCore::WebGLLoadPolicy::WebGLAllowCreation; }
-    virtual void setSystemWebGLLoadPolicy(WebKit::WebPageProxy*, WebCore::WebGLLoadPolicy) const { }
 #endif // ENABLE(WEBGL)
 };
 

Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp (165275 => 165276)


--- trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp	2014-03-07 20:19:28 UTC (rev 165275)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp	2014-03-07 20:20:17 UTC (rev 165276)
@@ -985,12 +985,6 @@
             return loadPolicy;
         }
 
-        virtual void setSystemWebGLLoadPolicy(WebPageProxy* page, WebCore::WebGLLoadPolicy policy) const override
-        {
-            if (m_client.setSystemWebGLLoadPolicy)
-                m_client.setSystemWebGLLoadPolicy(toAPI(page), toAPI(policy), m_client.base.clientInfo);
-        }
-
 #endif // ENABLE(WEBGL)
     };
 

Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPageLoaderClient.h (165275 => 165276)


--- trunk/Source/WebKit2/UIProcess/API/C/WKPageLoaderClient.h	2014-03-07 20:19:28 UTC (rev 165275)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPageLoaderClient.h	2014-03-07 20:20:17 UTC (rev 165276)
@@ -74,7 +74,6 @@
 typedef WKPluginLoadPolicy (*WKPagePluginLoadPolicyCallback)(WKPageRef page, WKPluginLoadPolicy currentPluginLoadPolicy, WKDictionaryRef pluginInfoDictionary, WKStringRef* unavailabilityDescription, const void* clientInfo);
 typedef void (*WKPagePluginDidFailCallback)(WKPageRef page, WKErrorCode errorCode, WKDictionaryRef pluginInfoDictionary, const void* clientInfo);
 typedef WKWebGLLoadPolicy (*WKPageWebGLLoadPolicyCallback)(WKPageRef page, WKStringRef url, const void* clientInfo);
-typedef void (*WKPageSetSystemWebGLLoadPolicyCallback)(WKPageRef page, WKWebGLLoadPolicy policy, const void* clientInfo);
 
 // Deprecated
 typedef void (*WKPageDidFailToInitializePluginCallback_deprecatedForUseWithV0)(WKPageRef page, WKStringRef mimeType, const void* clientInfo);
@@ -333,7 +332,6 @@
     // Version 4
     WKPageWebGLLoadPolicyCallback                                       webGLLoadPolicy;
     WKPageWebGLLoadPolicyCallback                                       resolveWebGLLoadPolicy;
-    WKPageSetSystemWebGLLoadPolicyCallback                              setSystemWebGLLoadPolicy;
 } WKPageLoaderClientV4;
 
 // FIXME: These should be deprecated.

Modified: trunk/Source/WebKit2/UIProcess/API/C/mac/WKContextPrivateMac.h (165275 => 165276)


--- trunk/Source/WebKit2/UIProcess/API/C/mac/WKContextPrivateMac.h	2014-03-07 20:19:28 UTC (rev 165275)
+++ trunk/Source/WebKit2/UIProcess/API/C/mac/WKContextPrivateMac.h	2014-03-07 20:20:17 UTC (rev 165276)
@@ -67,6 +67,9 @@
 /* Value type: WKBooleanRef */
 WK_EXPORT WKStringRef WKPlugInInfoIsSandboxedKey();
 
+WK_EXPORT bool WKContextShouldBlockWebGL();
+WK_EXPORT bool WKContextShouldSuggestBlockWebGL();
+
 #ifdef __cplusplus
 }
 #endif

Modified: trunk/Source/WebKit2/UIProcess/API/C/mac/WKContextPrivateMac.mm (165275 => 165276)


--- trunk/Source/WebKit2/UIProcess/API/C/mac/WKContextPrivateMac.mm	2014-03-07 20:19:28 UTC (rev 165275)
+++ trunk/Source/WebKit2/UIProcess/API/C/mac/WKContextPrivateMac.mm	2014-03-07 20:20:17 UTC (rev 165276)
@@ -137,3 +137,13 @@
 {
     return WKPluginInformationHasSandboxProfileKey();
 }
+
+bool WKContextShouldBlockWebGL()
+{
+    return WKShouldBlockWebGL();
+}
+
+bool WKContextShouldSuggestBlockWebGL()
+{
+    return WKShouldSuggestBlockingWebGL();
+}

Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (165275 => 165276)


--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp	2014-03-07 20:19:28 UTC (rev 165275)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp	2014-03-07 20:20:17 UTC (rev 165276)
@@ -2753,11 +2753,6 @@
 {
     loadPolicy = static_cast<uint32_t>(m_loaderClient->resolveWebGLLoadPolicy(this, url));
 }
-
-void WebPageProxy::setSystemWebGLPolicy(uint32_t loadPolicy)
-{
-    m_loaderClient->setSystemWebGLLoadPolicy(this, static_cast<WebCore::WebGLLoadPolicy>(loadPolicy));
-}
 #endif // ENABLE(WEBGL)
 
 void WebPageProxy::setToolbarsAreVisible(bool toolbarsAreVisible)

Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (165275 => 165276)


--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h	2014-03-07 20:19:28 UTC (rev 165275)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h	2014-03-07 20:20:17 UTC (rev 165276)
@@ -988,7 +988,6 @@
 #if ENABLE(WEBGL)
     void webGLPolicyForURL(const String& url, uint32_t& loadPolicy);
     void resolveWebGLPolicyForURL(const String& url, uint32_t& loadPolicy);
-    void setSystemWebGLPolicy(uint32_t loadPolicy);
 #endif // ENABLE(WEBGL)
     void setToolbarsAreVisible(bool toolbarsAreVisible);
     void getToolbarsAreVisible(bool& toolbarsAreVisible);

Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in (165275 => 165276)


--- trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in	2014-03-07 20:19:28 UTC (rev 165275)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in	2014-03-07 20:20:17 UTC (rev 165276)
@@ -34,7 +34,6 @@
     UnavailablePluginButtonClicked(uint32_t pluginUnavailabilityReason, String mimeType, String pluginURLString, String pluginspageAttributeURLString, String frameURLString, String pageURLString)
 #endif // ENABLE(NETSCAPE_PLUGIN_API)
 #if ENABLE(WEBGL)
-    SetSystemWebGLPolicy(uint32_t loadPolicy) -> ()
     WebGLPolicyForURL(String url) -> (uint32_t loadPolicy)
     ResolveWebGLPolicyForURL(String url) -> (uint32_t loadPolicy)
 #endif // ENABLE(WEBGL)

Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm (165275 => 165276)


--- trunk/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm	2014-03-07 20:19:28 UTC (rev 165275)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm	2014-03-07 20:20:17 UTC (rev 165276)
@@ -959,16 +959,6 @@
 #if ENABLE(WEBGL)
 WebCore::WebGLLoadPolicy WebPage::webGLPolicyForURL(WebFrame* frame, const String& url)
 {
-    if (WKShouldBlockWebGL()) {
-        if (m_systemWebGLPolicy != WebGLBlockCreation)
-            sendSync(Messages::WebPageProxy::SetSystemWebGLPolicy(static_cast<uint32_t>(WebGLBlockCreation)), Messages::WebPageProxy::SetSystemWebGLPolicy::Reply());
-        m_systemWebGLPolicy = WebGLBlockCreation;
-    } else if (WKShouldSuggestBlockingWebGL()) {
-        if (m_systemWebGLPolicy != WebGLPendingCreation)
-            sendSync(Messages::WebPageProxy::SetSystemWebGLPolicy(static_cast<uint32_t>(WebGLPendingCreation)), Messages::WebPageProxy::SetSystemWebGLPolicy::Reply());
-        m_systemWebGLPolicy = WebGLPendingCreation;
-    }
-
     uint32_t policyResult = 0;
 
     if (sendSync(Messages::WebPageProxy::WebGLPolicyForURL(url), Messages::WebPageProxy::WebGLPolicyForURL::Reply(policyResult)))

Modified: trunk/Tools/ChangeLog (165275 => 165276)


--- trunk/Tools/ChangeLog	2014-03-07 20:19:28 UTC (rev 165275)
+++ trunk/Tools/ChangeLog	2014-03-07 20:20:17 UTC (rev 165276)
@@ -1,3 +1,13 @@
+2014-03-07  Roger Fong  <[email protected]>
+
+        Remove dummy setSystemWebGLLoadPolicy client method.
+        https://bugs.webkit.org/show_bug.cgi?id=129873.
+
+        Reviewed by Dean Jackson.
+
+        * WebKitTestRunner/TestController.cpp:
+        (WTR::TestController::createWebViewWithOptions):
+
 2014-03-07  Mark Hahnenberg  <[email protected]>
 
         run-jsc-stress-tests doesn't eagerly report test failures when using the shell runner

Modified: trunk/Tools/WebKitTestRunner/TestController.cpp (165275 => 165276)


--- trunk/Tools/WebKitTestRunner/TestController.cpp	2014-03-07 20:19:28 UTC (rev 165275)
+++ trunk/Tools/WebKitTestRunner/TestController.cpp	2014-03-07 20:20:17 UTC (rev 165276)
@@ -487,7 +487,6 @@
         pluginLoadPolicy, // pluginLoadPolicy
         0, // webGLLoadPolicy
         0, // resolveWebGLLoadPolicy
-        0, // setSystemWebGLLoadPolicy
     };
     WKPageSetPageLoaderClient(m_mainWebView->page(), &pageLoaderClient.base);
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to