Changeset 165276 in webkit


Ignore:
Timestamp:
Mar 7, 2014 12:20:17 PM (10 years ago)
Author:
roger_fong@apple.com
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):

Location:
trunk
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r165273 r165276  
     12014-03-07  Roger Fong  <roger_fong@apple.com>
     2
     3        Replace setSystemWebGLLoadPolicy API with methods to query for WebGL blocking policy.
     4        https://bugs.webkit.org/show_bug.cgi?id=129873.
     5
     6        Reviewed by Dean Jackson.
     7
     8        Remove setSystemWebGLLoadPolicy API.
     9        * UIProcess/API/APILoaderClient.h:
     10        (API::LoaderClient::resolveWebGLLoadPolicy):
     11        * UIProcess/API/C/WKPage.cpp:
     12        (WKPageSetPageLoaderClient):
     13        * UIProcess/API/C/WKPageLoaderClient.h:
     14        * UIProcess/WebPageProxy.cpp:
     15        (WebKit::WebPageProxy::resolveWebGLPolicyForURL):
     16        * UIProcess/WebPageProxy.h:
     17        * UIProcess/WebPageProxy.messages.in:
     18        * WebProcess/WebPage/mac/WebPageMac.mm:
     19        (WebKit::WebPage::webGLPolicyForURL):
     20
     21        Add API to directly query the WebGL blocking policies from WKSI.
     22        * UIProcess/API/C/mac/WKContextPrivateMac.h:
     23        * UIProcess/API/C/mac/WKContextPrivateMac.mm:
     24        (WKContextShouldBlockWebGL):
     25        (WKContextShouldSuggestBlockWebGL):
     26
    1272014-03-07  Eric Carlson  <eric.carlson@apple.com>
    228
  • trunk/Source/WebKit2/UIProcess/API/APILoaderClient.h

    r165148 r165276  
    100100    virtual WebCore::WebGLLoadPolicy webGLLoadPolicy(WebKit::WebPageProxy*, const WTF::String&) const { return WebCore::WebGLLoadPolicy::WebGLAllowCreation; }
    101101    virtual WebCore::WebGLLoadPolicy resolveWebGLLoadPolicy(WebKit::WebPageProxy*, const WTF::String&) const { return WebCore::WebGLLoadPolicy::WebGLAllowCreation; }
    102     virtual void setSystemWebGLLoadPolicy(WebKit::WebPageProxy*, WebCore::WebGLLoadPolicy) const { }
    103102#endif // ENABLE(WEBGL)
    104103};
  • trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp

    r165148 r165276  
    986986        }
    987987
    988         virtual void setSystemWebGLLoadPolicy(WebPageProxy* page, WebCore::WebGLLoadPolicy policy) const override
    989         {
    990             if (m_client.setSystemWebGLLoadPolicy)
    991                 m_client.setSystemWebGLLoadPolicy(toAPI(page), toAPI(policy), m_client.base.clientInfo);
    992         }
    993 
    994988#endif // ENABLE(WEBGL)
    995989    };
  • trunk/Source/WebKit2/UIProcess/API/C/WKPageLoaderClient.h

    r165148 r165276  
    7575typedef void (*WKPagePluginDidFailCallback)(WKPageRef page, WKErrorCode errorCode, WKDictionaryRef pluginInfoDictionary, const void* clientInfo);
    7676typedef WKWebGLLoadPolicy (*WKPageWebGLLoadPolicyCallback)(WKPageRef page, WKStringRef url, const void* clientInfo);
    77 typedef void (*WKPageSetSystemWebGLLoadPolicyCallback)(WKPageRef page, WKWebGLLoadPolicy policy, const void* clientInfo);
    7877
    7978// Deprecated
     
    334333    WKPageWebGLLoadPolicyCallback                                       webGLLoadPolicy;
    335334    WKPageWebGLLoadPolicyCallback                                       resolveWebGLLoadPolicy;
    336     WKPageSetSystemWebGLLoadPolicyCallback                              setSystemWebGLLoadPolicy;
    337335} WKPageLoaderClientV4;
    338336
  • trunk/Source/WebKit2/UIProcess/API/C/mac/WKContextPrivateMac.h

    r160939 r165276  
    6868WK_EXPORT WKStringRef WKPlugInInfoIsSandboxedKey();
    6969
     70WK_EXPORT bool WKContextShouldBlockWebGL();
     71WK_EXPORT bool WKContextShouldSuggestBlockWebGL();
     72
    7073#ifdef __cplusplus
    7174}
  • trunk/Source/WebKit2/UIProcess/API/C/mac/WKContextPrivateMac.mm

    r161291 r165276  
    138138    return WKPluginInformationHasSandboxProfileKey();
    139139}
     140
     141bool WKContextShouldBlockWebGL()
     142{
     143    return WKShouldBlockWebGL();
     144}
     145
     146bool WKContextShouldSuggestBlockWebGL()
     147{
     148    return WKShouldSuggestBlockingWebGL();
     149}
  • trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp

    r165148 r165276  
    27542754    loadPolicy = static_cast<uint32_t>(m_loaderClient->resolveWebGLLoadPolicy(this, url));
    27552755}
    2756 
    2757 void WebPageProxy::setSystemWebGLPolicy(uint32_t loadPolicy)
    2758 {
    2759     m_loaderClient->setSystemWebGLLoadPolicy(this, static_cast<WebCore::WebGLLoadPolicy>(loadPolicy));
    2760 }
    27612756#endif // ENABLE(WEBGL)
    27622757
  • trunk/Source/WebKit2/UIProcess/WebPageProxy.h

    r165148 r165276  
    989989    void webGLPolicyForURL(const String& url, uint32_t& loadPolicy);
    990990    void resolveWebGLPolicyForURL(const String& url, uint32_t& loadPolicy);
    991     void setSystemWebGLPolicy(uint32_t loadPolicy);
    992991#endif // ENABLE(WEBGL)
    993992    void setToolbarsAreVisible(bool toolbarsAreVisible);
  • trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in

    r165148 r165276  
    3535#endif // ENABLE(NETSCAPE_PLUGIN_API)
    3636#if ENABLE(WEBGL)
    37     SetSystemWebGLPolicy(uint32_t loadPolicy) -> ()
    3837    WebGLPolicyForURL(String url) -> (uint32_t loadPolicy)
    3938    ResolveWebGLPolicyForURL(String url) -> (uint32_t loadPolicy)
  • trunk/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm

    r165148 r165276  
    960960WebCore::WebGLLoadPolicy WebPage::webGLPolicyForURL(WebFrame* frame, const String& url)
    961961{
    962     if (WKShouldBlockWebGL()) {
    963         if (m_systemWebGLPolicy != WebGLBlockCreation)
    964             sendSync(Messages::WebPageProxy::SetSystemWebGLPolicy(static_cast<uint32_t>(WebGLBlockCreation)), Messages::WebPageProxy::SetSystemWebGLPolicy::Reply());
    965         m_systemWebGLPolicy = WebGLBlockCreation;
    966     } else if (WKShouldSuggestBlockingWebGL()) {
    967         if (m_systemWebGLPolicy != WebGLPendingCreation)
    968             sendSync(Messages::WebPageProxy::SetSystemWebGLPolicy(static_cast<uint32_t>(WebGLPendingCreation)), Messages::WebPageProxy::SetSystemWebGLPolicy::Reply());
    969         m_systemWebGLPolicy = WebGLPendingCreation;
    970     }
    971 
    972962    uint32_t policyResult = 0;
    973963
  • trunk/Tools/ChangeLog

    r165274 r165276  
     12014-03-07  Roger Fong  <roger_fong@apple.com>
     2
     3        Remove dummy setSystemWebGLLoadPolicy client method.
     4        https://bugs.webkit.org/show_bug.cgi?id=129873.
     5
     6        Reviewed by Dean Jackson.
     7
     8        * WebKitTestRunner/TestController.cpp:
     9        (WTR::TestController::createWebViewWithOptions):
     10
    1112014-03-07  Mark Hahnenberg  <mhahnenberg@apple.com>
    212
  • trunk/Tools/WebKitTestRunner/TestController.cpp

    r165148 r165276  
    488488        0, // webGLLoadPolicy
    489489        0, // resolveWebGLLoadPolicy
    490         0, // setSystemWebGLLoadPolicy
    491490    };
    492491    WKPageSetPageLoaderClient(m_mainWebView->page(), &pageLoaderClient.base);
Note: See TracChangeset for help on using the changeset viewer.