Changeset 221465 in webkit


Ignore:
Timestamp:
Aug 31, 2017, 6:46:26 PM (8 years ago)
Author:
achristensen@apple.com
Message:

Add ObjC SPI corresponding to WKPageLoaderClient's webGLLoadPolicy and resolveWebGLLoadPolicy
https://bugs.webkit.org/show_bug.cgi?id=175779
<rdar://problem/22367975>

Reviewed by Tim Horton.

Source/WebCore:

Covered by new API tests.

  • loader/FrameLoaderClient.h:

Source/WebKit:

  • UIProcess/API/APINavigationClient.h:

(API::NavigationClient::webGLLoadPolicy const):
(API::NavigationClient::resolveWebGLLoadPolicy const):

  • UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
  • UIProcess/Cocoa/NavigationState.h:
  • UIProcess/Cocoa/NavigationState.mm:

(WebKit::NavigationState::setNavigationDelegate):
(WebKit::toWebCoreWebGLLoadPolicy):
(WebKit::NavigationState::NavigationClient::webGLLoadPolicy const):
(WebKit::NavigationState::NavigationClient::resolveWebGLLoadPolicy const):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::webGLPolicyForURL):
(WebKit::WebPageProxy::resolveWebGLPolicyForURL):

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::webGLPolicyForURL const):
(WebKit::WebFrameLoaderClient::resolveWebGLPolicyForURL const):

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::webGLPolicyForURL):
(WebKit::WebPage::resolveWebGLPolicyForURL):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::webGLPolicyForURL):
(WebKit::WebPage::resolveWebGLPolicyForURL):

  • WebProcess/WebPage/mac/WebPageMac.mm:

(WebKit::WebPage::webGLPolicyForURL):
(WebKit::WebPage::resolveWebGLPolicyForURL):

Source/WebKitLegacy/mac:

  • WebCoreSupport/WebFrameLoaderClient.h:
  • WebCoreSupport/WebFrameLoaderClient.mm:

(WebFrameLoaderClient::webGLPolicyForURL const):
(WebFrameLoaderClient::resolveWebGLPolicyForURL const):

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/WebGLPolicy.mm: Added.

(-[WebGLTestDelegate webView:startURLSchemeTask:]):
(-[WebGLTestDelegate webView:stopURLSchemeTask:]):
(-[WebGLTestDelegate _webView:webGLLoadPolicyForURL:decisionHandler:]):
(-[WebGLTestDelegate _webView:resolveWebGLLoadPolicyForURL:decisionHandler:]):
(-[WebGLTestDelegate webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]):
(urlsEqual):
(runTest):
(TEST):

Location:
trunk
Files:
1 added
21 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r221464 r221465  
     12017-08-31  Alex Christensen  <achristensen@webkit.org>
     2
     3        Add ObjC SPI corresponding to WKPageLoaderClient's webGLLoadPolicy and resolveWebGLLoadPolicy
     4        https://bugs.webkit.org/show_bug.cgi?id=175779
     5        <rdar://problem/22367975>
     6
     7        Reviewed by Tim Horton.
     8
     9        Covered by new API tests.
     10
     11        * loader/FrameLoaderClient.h:
     12
    1132017-08-31  Andreas Kling  <akling@apple.com>
    214
  • trunk/Source/WebCore/loader/FrameLoaderClient.h

    r221444 r221465  
    332332    // notification with the given GL_ARB_robustness guilt/innocence code (see Extensions3D.h).
    333333    virtual void didLoseWebGLContext(int) { }
    334     virtual WebGLLoadPolicy webGLPolicyForURL(const String&) const { return WebGLAllowCreation; }
    335     virtual WebGLLoadPolicy resolveWebGLPolicyForURL(const String&) const { return WebGLAllowCreation; }
     334    virtual WebGLLoadPolicy webGLPolicyForURL(const URL&) const { return WebGLAllowCreation; }
     335    virtual WebGLLoadPolicy resolveWebGLPolicyForURL(const URL&) const { return WebGLAllowCreation; }
    336336#endif
    337337
  • trunk/Source/WebKit/ChangeLog

    r221461 r221465  
     12017-08-31  Alex Christensen  <achristensen@webkit.org>
     2
     3        Add ObjC SPI corresponding to WKPageLoaderClient's webGLLoadPolicy and resolveWebGLLoadPolicy
     4        https://bugs.webkit.org/show_bug.cgi?id=175779
     5        <rdar://problem/22367975>
     6
     7        Reviewed by Tim Horton.
     8
     9        * UIProcess/API/APINavigationClient.h:
     10        (API::NavigationClient::webGLLoadPolicy const):
     11        (API::NavigationClient::resolveWebGLLoadPolicy const):
     12        * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
     13        * UIProcess/Cocoa/NavigationState.h:
     14        * UIProcess/Cocoa/NavigationState.mm:
     15        (WebKit::NavigationState::setNavigationDelegate):
     16        (WebKit::toWebCoreWebGLLoadPolicy):
     17        (WebKit::NavigationState::NavigationClient::webGLLoadPolicy const):
     18        (WebKit::NavigationState::NavigationClient::resolveWebGLLoadPolicy const):
     19        * UIProcess/WebPageProxy.cpp:
     20        (WebKit::WebPageProxy::webGLPolicyForURL):
     21        (WebKit::WebPageProxy::resolveWebGLPolicyForURL):
     22        * UIProcess/WebPageProxy.h:
     23        * UIProcess/WebPageProxy.messages.in:
     24        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
     25        (WebKit::WebFrameLoaderClient::webGLPolicyForURL const):
     26        (WebKit::WebFrameLoaderClient::resolveWebGLPolicyForURL const):
     27        * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
     28        * WebProcess/WebPage/WebPage.cpp:
     29        (WebKit::WebPage::webGLPolicyForURL):
     30        (WebKit::WebPage::resolveWebGLPolicyForURL):
     31        * WebProcess/WebPage/WebPage.h:
     32        * WebProcess/WebPage/ios/WebPageIOS.mm:
     33        (WebKit::WebPage::webGLPolicyForURL):
     34        (WebKit::WebPage::resolveWebGLPolicyForURL):
     35        * WebProcess/WebPage/mac/WebPageMac.mm:
     36        (WebKit::WebPage::webGLPolicyForURL):
     37        (WebKit::WebPage::resolveWebGLPolicyForURL):
     38
    1392017-08-31  Brady Eidson  <beidson@apple.com>
    240
  • trunk/Source/WebKit/UIProcess/API/APINavigationClient.h

    r221444 r221465  
    114114#endif
    115115
     116#if ENABLE(WEBGL)
     117    virtual void webGLLoadPolicy(WebKit::WebPageProxy&, const WebCore::URL&, WTF::Function<void(WebCore::WebGLLoadPolicy)>&& completionHandler) const { completionHandler(WebCore::WebGLLoadPolicy::WebGLAllowCreation); }
     118    virtual void resolveWebGLLoadPolicy(WebKit::WebPageProxy&, const WebCore::URL&, WTF::Function<void(WebCore::WebGLLoadPolicy)>&& completionHandler) const { completionHandler(WebCore::WebGLLoadPolicy::WebGLAllowCreation); }
     119#endif
     120
    116121    virtual void didBeginNavigationGesture(WebKit::WebPageProxy&) { }
    117122    virtual void willEndNavigationGesture(WebKit::WebPageProxy&, bool willNavigate, WebKit::WebBackForwardListItem&) { }
  • trunk/Source/WebKit/UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h

    r221444 r221465  
    3333
    3434@class _WKWebsitePolicies;
     35
     36typedef NS_ENUM(NSInteger, _WKWebGLLoadPolicy) {
     37    _WKWebGLLoadPolicyBlockCreation,
     38    _WKWebGLLoadPolicyAllowCreation,
     39    _WKWebGLLoadPolicyPendingCreation,
     40} WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
    3541
    3642static const WKNavigationActionPolicy _WKNavigationActionPolicyDownload = (WKNavigationActionPolicy)(WKNavigationActionPolicyAllow + 1);
     
    7783#endif
    7884
     85- (void)_webView:(WKWebView *)webView webGLLoadPolicyForURL:(NSURL *)url decisionHandler:(void (^)(_WKWebGLLoadPolicy))decisionHandler WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
     86- (void)_webView:(WKWebView *)webView resolveWebGLLoadPolicyForURL:(NSURL *)url decisionHandler:(void (^)(_WKWebGLLoadPolicy))decisionHandler WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
     87
    7988@end
    8089
  • trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.h

    r221444 r221465  
    117117#endif
    118118
     119#if ENABLE(WEBGL)
     120        void webGLLoadPolicy(WebPageProxy&, const WebCore::URL&, WTF::Function<void(WebCore::WebGLLoadPolicy)>&& completionHandler) const final;
     121        void resolveWebGLLoadPolicy(WebPageProxy&, const WebCore::URL&, WTF::Function<void(WebCore::WebGLLoadPolicy)>&& completionHandler) const final;
     122#endif
     123
    119124        void decidePolicyForNavigationAction(WebPageProxy&, Ref<API::NavigationAction>&&, Ref<WebFramePolicyListenerProxy>&&, API::Object* userData) override;
    120125        void decidePolicyForNavigationResponse(WebPageProxy&, API::NavigationResponse&, Ref<WebFramePolicyListenerProxy>&&, API::Object* userData) override;
     
    202207        bool webViewDidRequestPasswordForQuickLookDocument : 1;
    203208#endif
     209
     210#if ENABLE(WEBGL)
     211        bool webViewWebGLLoadPolicyForURL : 1;
     212        bool webViewResolveWebGLLoadPolicyForURL : 1;
     213#endif
    204214    } m_navigationDelegateMethods;
    205215
  • trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.mm

    r221444 r221465  
    174174    m_navigationDelegateMethods.webViewDidRequestPasswordForQuickLookDocument = [delegate respondsToSelector:@selector(_webViewDidRequestPasswordForQuickLookDocument:)];
    175175#endif
     176#if ENABLE(WEBGL)
     177    m_navigationDelegateMethods.webViewWebGLLoadPolicyForURL = [delegate respondsToSelector:@selector(_webView:webGLLoadPolicyForURL:decisionHandler:)];
     178    m_navigationDelegateMethods.webViewResolveWebGLLoadPolicyForURL = [delegate respondsToSelector:@selector(_webView:resolveWebGLLoadPolicyForURL:decisionHandler:)];
     179#endif
    176180}
    177181
     
    284288NavigationState::NavigationClient::~NavigationClient()
    285289{
     290}
     291
     292inline WebCore::WebGLLoadPolicy toWebCoreWebGLLoadPolicy(_WKWebGLLoadPolicy policy)
     293{
     294    switch (policy) {
     295    case _WKWebGLLoadPolicyAllowCreation:
     296        return WebCore::WebGLAllowCreation;
     297    case _WKWebGLLoadPolicyBlockCreation:
     298        return WebCore::WebGLBlockCreation;
     299    case _WKWebGLLoadPolicyPendingCreation:
     300        return WebCore::WebGLPendingCreation;
     301    }
     302   
     303    ASSERT_NOT_REACHED();
     304    return WebCore::WebGLAllowCreation;
     305}
     306
     307void NavigationState::NavigationClient::webGLLoadPolicy(WebPageProxy&, const WebCore::URL& url, WTF::Function<void(WebCore::WebGLLoadPolicy)>&& completionHandler) const
     308{
     309    if (!m_navigationState.m_navigationDelegateMethods.webViewWebGLLoadPolicyForURL)
     310        completionHandler(WebGLAllowCreation);
     311
     312    auto navigationDelegate = m_navigationState.m_navigationDelegate.get();
     313    Ref<CompletionHandlerCallChecker> checker = CompletionHandlerCallChecker::create(navigationDelegate.get(), @selector(_webView:webGLLoadPolicyForURL:decisionHandler:));
     314    [(id <WKNavigationDelegatePrivate>)navigationDelegate _webView:m_navigationState.m_webView webGLLoadPolicyForURL:(NSURL *)url decisionHandler:BlockPtr<void(_WKWebGLLoadPolicy)>::fromCallable([completionHandler = WTFMove(completionHandler), checker = WTFMove(checker)](_WKWebGLLoadPolicy policy) {
     315        if (checker->completionHandlerHasBeenCalled())
     316            return;
     317        checker->didCallCompletionHandler();
     318        completionHandler(toWebCoreWebGLLoadPolicy(policy));
     319    }).get()];
     320}
     321
     322void NavigationState::NavigationClient::resolveWebGLLoadPolicy(WebPageProxy&, const WebCore::URL& url, WTF::Function<void(WebCore::WebGLLoadPolicy)>&& completionHandler) const
     323{
     324    if (!m_navigationState.m_navigationDelegateMethods.webViewResolveWebGLLoadPolicyForURL)
     325        completionHandler(WebGLAllowCreation);
     326   
     327    auto navigationDelegate = m_navigationState.m_navigationDelegate.get();
     328    Ref<CompletionHandlerCallChecker> checker = CompletionHandlerCallChecker::create(navigationDelegate.get(), @selector(_webView:resolveWebGLLoadPolicyForURL:decisionHandler:));
     329    [(id <WKNavigationDelegatePrivate>)navigationDelegate _webView:m_navigationState.m_webView resolveWebGLLoadPolicyForURL:(NSURL *)url decisionHandler:BlockPtr<void(_WKWebGLLoadPolicy)>::fromCallable([completionHandler = WTFMove(completionHandler), checker = WTFMove(checker)](_WKWebGLLoadPolicy policy) {
     330        if (checker->completionHandlerHasBeenCalled())
     331            return;
     332        checker->didCallCompletionHandler();
     333        completionHandler(toWebCoreWebGLLoadPolicy(policy));
     334    }).get()];
    286335}
    287336
  • trunk/Source/WebKit/UIProcess/WebPageProxy.cpp

    r221444 r221465  
    40414041
    40424042#if ENABLE(WEBGL)
    4043 void WebPageProxy::webGLPolicyForURL(const String& url, uint32_t& loadPolicy)
    4044 {
    4045     loadPolicy = static_cast<uint32_t>(m_loaderClient->webGLLoadPolicy(*this, url));
    4046 }
    4047 
    4048 void WebPageProxy::resolveWebGLPolicyForURL(const String& url, uint32_t& loadPolicy)
    4049 {
    4050     loadPolicy = static_cast<uint32_t>(m_loaderClient->resolveWebGLLoadPolicy(*this, url));
     4043void WebPageProxy::webGLPolicyForURL(URL&& url, Ref<Messages::WebPageProxy::WebGLPolicyForURL::DelayedReply>&& reply)
     4044{
     4045    if (m_navigationClient) {
     4046        m_navigationClient->webGLLoadPolicy(*this, url, [reply = WTFMove(reply)](WebGLLoadPolicy policy) {
     4047            reply->send(static_cast<uint32_t>(policy));
     4048        });
     4049    } else
     4050        reply->send(static_cast<uint32_t>(m_loaderClient->webGLLoadPolicy(*this, url)));
     4051}
     4052
     4053void WebPageProxy::resolveWebGLPolicyForURL(URL&& url, Ref<Messages::WebPageProxy::ResolveWebGLPolicyForURL::DelayedReply>&& reply)
     4054{
     4055    if (m_navigationClient) {
     4056        m_navigationClient->resolveWebGLLoadPolicy(*this, url, [reply = WTFMove(reply)](WebGLLoadPolicy policy) {
     4057            reply->send(static_cast<uint32_t>(policy));
     4058        });
     4059    } else
     4060        reply->send(static_cast<uint32_t>(m_loaderClient->resolveWebGLLoadPolicy(*this, url)));
    40514061}
    40524062#endif // ENABLE(WEBGL)
  • trunk/Source/WebKit/UIProcess/WebPageProxy.h

    r221444 r221465  
    13031303#endif // ENABLE(NETSCAPE_PLUGIN_API)
    13041304#if ENABLE(WEBGL)
    1305     void webGLPolicyForURL(const String& url, uint32_t& loadPolicy);
    1306     void resolveWebGLPolicyForURL(const String& url, uint32_t& loadPolicy);
     1305    void webGLPolicyForURL(WebCore::URL&&, Ref<Messages::WebPageProxy::WebGLPolicyForURL::DelayedReply>&&);
     1306    void resolveWebGLPolicyForURL(WebCore::URL&&, Ref<Messages::WebPageProxy::ResolveWebGLPolicyForURL::DelayedReply>&&);
    13071307#endif // ENABLE(WEBGL)
    13081308    void setToolbarsAreVisible(bool toolbarsAreVisible);
  • trunk/Source/WebKit/UIProcess/WebPageProxy.messages.in

    r221444 r221465  
    3535#endif // ENABLE(NETSCAPE_PLUGIN_API)
    3636#if ENABLE(WEBGL)
    37     WebGLPolicyForURL(String url) -> (uint32_t loadPolicy)
    38     ResolveWebGLPolicyForURL(String url) -> (uint32_t loadPolicy)
     37    WebGLPolicyForURL(WebCore::URL url) -> (uint32_t loadPolicy) Delayed
     38    ResolveWebGLPolicyForURL(WebCore::URL url) -> (uint32_t loadPolicy) Delayed
    3939#endif // ENABLE(WEBGL)
    4040    DidChangeViewportProperties(struct WebCore::ViewportAttributes attributes)
  • trunk/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp

    r221444 r221465  
    15181518#if ENABLE(WEBGL)
    15191519
    1520 WebCore::WebGLLoadPolicy WebFrameLoaderClient::webGLPolicyForURL(const String& url) const
     1520WebCore::WebGLLoadPolicy WebFrameLoaderClient::webGLPolicyForURL(const URL& url) const
    15211521{
    15221522    if (auto* webPage = m_frame->page())
     
    15261526}
    15271527
    1528 WebCore::WebGLLoadPolicy WebFrameLoaderClient::resolveWebGLPolicyForURL(const String& url) const
     1528WebCore::WebGLLoadPolicy WebFrameLoaderClient::resolveWebGLPolicyForURL(const URL& url) const
    15291529{
    15301530    if (auto* webPage = m_frame->page())
  • trunk/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.h

    r221444 r221465  
    205205   
    206206#if ENABLE(WEBGL)
    207     WebCore::WebGLLoadPolicy webGLPolicyForURL(const String&) const final;
    208     WebCore::WebGLLoadPolicy resolveWebGLPolicyForURL(const String&) const final;
     207    WebCore::WebGLLoadPolicy webGLPolicyForURL(const WebCore::URL&) const final;
     208    WebCore::WebGLLoadPolicy resolveWebGLPolicyForURL(const WebCore::URL&) const final;
    209209#endif // ENABLE(WEBGL)
    210210
  • trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp

    r221456 r221465  
    820820
    821821#if ENABLE(WEBGL) && !PLATFORM(COCOA)
    822 WebCore::WebGLLoadPolicy WebPage::webGLPolicyForURL(WebFrame*, const String& /* url */)
     822WebCore::WebGLLoadPolicy WebPage::webGLPolicyForURL(WebFrame*, const URL&)
    823823{
    824824    return WebGLAllowCreation;
    825825}
    826826
    827 WebCore::WebGLLoadPolicy WebPage::resolveWebGLPolicyForURL(WebFrame*, const String& /* url */)
     827WebCore::WebGLLoadPolicy WebPage::resolveWebGLPolicyForURL(WebFrame*, const URL&)
    828828{
    829829    return WebGLAllowCreation;
  • trunk/Source/WebKit/WebProcess/WebPage/WebPage.h

    r221216 r221465  
    368368
    369369#if ENABLE(WEBGL)
    370     WebCore::WebGLLoadPolicy webGLPolicyForURL(WebFrame*, const String&);
    371     WebCore::WebGLLoadPolicy resolveWebGLPolicyForURL(WebFrame*, const String&);
     370    WebCore::WebGLLoadPolicy webGLPolicyForURL(WebFrame*, const WebCore::URL&);
     371    WebCore::WebGLLoadPolicy resolveWebGLPolicyForURL(WebFrame*, const WebCore::URL&);
    372372#endif
    373373   
  • trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm

    r221443 r221465  
    32853285
    32863286#if ENABLE(WEBGL)
    3287 WebCore::WebGLLoadPolicy WebPage::webGLPolicyForURL(WebFrame*, const String&)
     3287WebCore::WebGLLoadPolicy WebPage::webGLPolicyForURL(WebFrame*, const URL&)
    32883288{
    32893289    return WebGLAllowCreation;
    32903290}
    32913291
    3292 WebCore::WebGLLoadPolicy WebPage::resolveWebGLPolicyForURL(WebFrame*, const String&)
     3292WebCore::WebGLLoadPolicy WebPage::resolveWebGLPolicyForURL(WebFrame*, const URL&)
    32933293{
    32943294    return WebGLAllowCreation;
  • trunk/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm

    r221381 r221465  
    925925
    926926#if ENABLE(WEBGL)
    927 WebCore::WebGLLoadPolicy WebPage::webGLPolicyForURL(WebFrame* frame, const String& url)
     927WebCore::WebGLLoadPolicy WebPage::webGLPolicyForURL(WebFrame* frame, const URL& url)
    928928{
    929929    uint32_t policyResult = 0;
     
    935935}
    936936
    937 WebCore::WebGLLoadPolicy WebPage::resolveWebGLPolicyForURL(WebFrame* frame, const String& url)
     937WebCore::WebGLLoadPolicy WebPage::resolveWebGLPolicyForURL(WebFrame* frame, const URL& url)
    938938{
    939939    uint32_t policyResult = 0;
  • trunk/Source/WebKitLegacy/mac/ChangeLog

    r221381 r221465  
     12017-08-31  Alex Christensen  <achristensen@webkit.org>
     2
     3        Add ObjC SPI corresponding to WKPageLoaderClient's webGLLoadPolicy and resolveWebGLLoadPolicy
     4        https://bugs.webkit.org/show_bug.cgi?id=175779
     5        <rdar://problem/22367975>
     6
     7        Reviewed by Tim Horton.
     8
     9        * WebCoreSupport/WebFrameLoaderClient.h:
     10        * WebCoreSupport/WebFrameLoaderClient.mm:
     11        (WebFrameLoaderClient::webGLPolicyForURL const):
     12        (WebFrameLoaderClient::resolveWebGLPolicyForURL const):
     13
    1142017-08-30  Andy Estes  <aestes@apple.com>
    215
  • trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.h

    r220857 r221465  
    212212
    213213#if ENABLE(WEBGL)
    214     WebCore::WebGLLoadPolicy webGLPolicyForURL(const String&) const final;
    215     WebCore::WebGLLoadPolicy resolveWebGLPolicyForURL(const String&) const final;
     214    WebCore::WebGLLoadPolicy webGLPolicyForURL(const WebCore::URL&) const final;
     215    WebCore::WebGLLoadPolicy resolveWebGLPolicyForURL(const WebCore::URL&) const final;
    216216#endif
    217217
  • trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm

    r220857 r221465  
    21472147}
    21482148
    2149 WebCore::WebGLLoadPolicy WebFrameLoaderClient::webGLPolicyForURL(const String&) const
     2149WebCore::WebGLLoadPolicy WebFrameLoaderClient::webGLPolicyForURL(const URL&) const
    21502150{
    21512151    return shouldBlockWebGL() ? WebGLBlockCreation : WebGLAllowCreation;
    21522152}
    21532153
    2154 WebCore::WebGLLoadPolicy WebFrameLoaderClient::resolveWebGLPolicyForURL(const String&) const
     2154WebCore::WebGLLoadPolicy WebFrameLoaderClient::resolveWebGLPolicyForURL(const URL&) const
    21552155{
    21562156    return shouldBlockWebGL() ? WebGLBlockCreation : WebGLAllowCreation;
  • trunk/Tools/ChangeLog

    r221463 r221465  
     12017-08-31  Alex Christensen  <achristensen@webkit.org>
     2
     3        Add ObjC SPI corresponding to WKPageLoaderClient's webGLLoadPolicy and resolveWebGLLoadPolicy
     4        https://bugs.webkit.org/show_bug.cgi?id=175779
     5        <rdar://problem/22367975>
     6
     7        Reviewed by Tim Horton.
     8
     9        * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
     10        * TestWebKitAPI/Tests/WebKitCocoa/WebGLPolicy.mm: Added.
     11        (-[WebGLTestDelegate webView:startURLSchemeTask:]):
     12        (-[WebGLTestDelegate webView:stopURLSchemeTask:]):
     13        (-[WebGLTestDelegate _webView:webGLLoadPolicyForURL:decisionHandler:]):
     14        (-[WebGLTestDelegate _webView:resolveWebGLLoadPolicyForURL:decisionHandler:]):
     15        (-[WebGLTestDelegate webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]):
     16        (urlsEqual):
     17        (runTest):
     18        (TEST):
     19
    1202017-08-31  Don Olmstead  <don.olmstead@sony.com>
    221
  • trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj

    r221433 r221465  
    230230                5C7964101EB0278D0075D74C /* EventModifiers.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5C79640F1EB0269B0075D74C /* EventModifiers.cpp */; };
    231231                5C838F7F1DB04F900082858F /* LoadInvalidURLRequest.mm in Sources */ = {isa = PBXBuildFile; fileRef = 57901FAE1CAF137100ED64F9 /* LoadInvalidURLRequest.mm */; };
     232                5C973F5C1F58EF8B00359C27 /* WebGLPolicy.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5C973F5B1F58EF0A00359C27 /* WebGLPolicy.mm */; };
    232233                5C9E56851DF9145400C9EE33 /* WebsitePolicies.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5C9E56841DF9143D00C9EE33 /* WebsitePolicies.mm */; };
    233234                5C9E56871DF914AE00C9EE33 /* contentBlockerCheck.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 5C9E56861DF9148E00C9EE33 /* contentBlockerCheck.html */; };
     
    13091310                5C726D6E1D3EE06800C5E1A1 /* InstanceMethodSwizzler.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = InstanceMethodSwizzler.mm; path = cocoa/InstanceMethodSwizzler.mm; sourceTree = "<group>"; };
    13101311                5C79640F1EB0269B0075D74C /* EventModifiers.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EventModifiers.cpp; sourceTree = "<group>"; };
     1312                5C973F5B1F58EF0A00359C27 /* WebGLPolicy.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebGLPolicy.mm; sourceTree = "<group>"; };
    13111313                5C9E56841DF9143D00C9EE33 /* WebsitePolicies.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebsitePolicies.mm; sourceTree = "<group>"; };
    13121314                5C9E56861DF9148E00C9EE33 /* contentBlockerCheck.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = contentBlockerCheck.html; sourceTree = "<group>"; };
     
    19711973                                93E943F11CD3E87E00AC08C2 /* VideoControlsManager.mm */,
    19721974                                6356FB211EC4E0BA0044BF18 /* VisibleContentRect.mm */,
     1975                                5C973F5B1F58EF0A00359C27 /* WebGLPolicy.mm */,
    19731976                                51714EB61CF8C7A4004723C4 /* WebProcessKillIDBCleanup.mm */,
    19741977                                5120C83C1E6750790025B250 /* WebsiteDataStoreCustomPaths.mm */,
     
    33603363                                7C83E04C1D0A641800FEBCF3 /* WebCoreNSURLSession.mm in Sources */,
    33613364                                7CCE7F1A1A411AE600447C4C /* WebCoreStatisticsWithNoWebProcess.cpp in Sources */,
     3365                                5C973F5C1F58EF8B00359C27 /* WebGLPolicy.mm in Sources */,
    33623366                                7CCE7EAB1A411A2400447C4C /* WebKitAgnosticTest.mm in Sources */,
    33633367                                51714EB81CF8CA17004723C4 /* WebProcessKillIDBCleanup.mm in Sources */,
Note: See TracChangeset for help on using the changeset viewer.