Changeset 164451 in webkit
- Timestamp:
- Feb 20, 2014, 3:11:52 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r164449 r164451 1 2014-02-20 Dean Jackson <dino@apple.com> 2 3 Add an unresolved WebGLPolicy and an API to resolve it 4 https://bugs.webkit.org/show_bug.cgi?id=129109 5 6 Reviewed by Anders Carlsson. 7 8 Add a third WebGLLoadPolicy which is "pending" allowing the page 9 to go ahead with creating the WebGLRenderingContext and resolve the policy 10 at a later time. Add a new API resolveWebGLLoadPolicy to do the resolution. 11 12 * html/HTMLCanvasElement.cpp: 13 (WebCore::HTMLCanvasElement::getContext): WebGLBlock -> WebGLBlockCreation 14 * loader/FrameLoaderClient.h: 15 (WebCore::FrameLoaderClient::webGLPolicyForURL): WebGLAllow -> WebGLAllowCreation. 16 (WebCore::FrameLoaderClient::resolveWebGLPolicyForURL): New method. 17 * loader/FrameLoaderTypes.h: Add WebGLPendingCreation. 18 1 19 2014-02-20 Zalan Bujtas <zalan@apple.com> 2 20 -
trunk/Source/WebCore/html/HTMLCanvasElement.cpp
r164131 r164451 227 227 WebGLLoadPolicy policy = page->mainFrame().loader().client().webGLPolicyForURL(topDocument.url()); 228 228 229 if (policy == WebGLBlock )229 if (policy == WebGLBlockCreation) 230 230 return nullptr; 231 231 } -
trunk/Source/WebCore/loader/FrameLoaderClient.h
r164192 r164451 326 326 // notification with the given GL_ARB_robustness guilt/innocence code (see Extensions3D.h). 327 327 virtual void didLoseWebGLContext(int) { } 328 virtual WebGLLoadPolicy webGLPolicyForURL(const String&) const { return WebGLAllow; } 328 virtual WebGLLoadPolicy webGLPolicyForURL(const String&) const { return WebGLAllowCreation; } 329 virtual WebGLLoadPolicy resolveWebGLPolicyForURL(const String&) const { return WebGLAllowCreation; } 329 330 #endif 330 331 -
trunk/Source/WebCore/loader/FrameLoaderTypes.h
r162912 r164451 108 108 109 109 enum WebGLLoadPolicy { 110 WebGLBlock = 0, 111 WebGLAllow 110 WebGLBlockCreation, 111 WebGLAllowCreation, 112 WebGLPendingCreation 112 113 }; 113 114 -
trunk/Source/WebKit2/ChangeLog
r164450 r164451 1 2014-02-20 Dean Jackson <dino@apple.com> 2 3 Add an unresolved WebGLPolicy and an API to resolve it 4 https://bugs.webkit.org/show_bug.cgi?id=129109 5 6 Reviewed by Anders Carlsson. 7 8 Add a third WebGLLoadPolicy which is "pending" allowing the page 9 to go ahead with creating the WebGLRenderingContext and resolve the policy 10 at a later time. Add a new API resolveWebGLLoadPolicy to do the resolution. 11 12 * UIProcess/API/APILoaderClient.h: 13 (API::LoaderClient::webGLLoadPolicy): New return value. 14 (API::LoaderClient::resolveWebGLLoadPolicy): New method definition. 15 * UIProcess/API/C/WKAPICast.h: 16 (WebKit::toWebGLLoadPolicy): Change names of return types. 17 * UIProcess/API/C/WKPage.cpp: 18 (WKPageSetPageLoaderClient): New stubs. 19 * UIProcess/API/C/WKPageLoaderClient.h: New policy type kWKWebGLLoadPolicyPending. 20 * UIProcess/WebPageProxy.cpp: 21 (WebKit::WebPageProxy::resolveWebGLPolicyForURL): New method. 22 * UIProcess/WebPageProxy.h: 23 * UIProcess/WebPageProxy.messages.in: New message. 24 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: 25 (WebKit::WebFrameLoaderClient::webGLPolicyForURL): 26 (WebKit::WebFrameLoaderClient::resolveWebGLPolicyForURL): 27 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h: 28 * WebProcess/WebPage/WebPage.cpp: 29 (WebKit::WebPage::webGLPolicyForURL): 30 (WebKit::WebPage::resolveWebGLPolicyForURL): 31 * WebProcess/WebPage/WebPage.h: 32 1 33 2014-02-20 Anders Carlsson <andersca@apple.com> 2 34 -
trunk/Source/WebKit2/UIProcess/API/APILoaderClient.h
r164132 r164451 98 98 99 99 #if ENABLE(WEBGL) 100 virtual WebCore::WebGLLoadPolicy webGLLoadPolicy(WebKit::WebPageProxy*, const WTF::String&) const { return WebCore::WebGLLoadPolicy::WebGLAllow; } 100 virtual WebCore::WebGLLoadPolicy webGLLoadPolicy(WebKit::WebPageProxy*, const WTF::String&) const { return WebCore::WebGLLoadPolicy::WebGLAllowCreation; } 101 virtual WebCore::WebGLLoadPolicy resolveWebGLLoadPolicy(WebKit::WebPageProxy*, const WTF::String&) const { return WebCore::WebGLLoadPolicy::WebGLAllowCreation; } 101 102 #endif // ENABLE(WEBGL) 102 103 }; -
trunk/Source/WebKit2/UIProcess/API/C/WKAPICast.h
r162912 r164451 482 482 switch (webGLLoadPolicy) { 483 483 case kWKWebGLLoadPolicyLoadNormally: 484 return WebCore::WebGLAllow ;484 return WebCore::WebGLAllowCreation; 485 485 case kWKWebGLLoadPolicyBlocked: 486 return WebCore::WebGLBlock; 487 } 488 489 ASSERT_NOT_REACHED(); 490 return WebCore::WebGLAllow; 486 return WebCore::WebGLBlockCreation; 487 case kWKWebGLLoadPolicyPending: 488 return WebCore::WebGLPendingCreation; 489 } 490 491 ASSERT_NOT_REACHED(); 492 return WebCore::WebGLAllowCreation; 491 493 } 492 494 -
trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp
r164450 r164451 968 968 virtual WebCore::WebGLLoadPolicy webGLLoadPolicy(WebPageProxy* page, const String& url) const override 969 969 { 970 WebCore::WebGLLoadPolicy loadPolicy = WebGLAllow ;970 WebCore::WebGLLoadPolicy loadPolicy = WebGLAllowCreation; 971 971 972 972 if (m_client.webGLLoadPolicy) … … 975 975 return loadPolicy; 976 976 } 977 978 virtual WebCore::WebGLLoadPolicy resolveWebGLLoadPolicy(WebPageProxy* page, const String& url) const override 979 { 980 WebCore::WebGLLoadPolicy loadPolicy = WebGLAllowCreation; 981 982 if (m_client.resolveWebGLLoadPolicy) 983 loadPolicy = toWebGLLoadPolicy(m_client.resolveWebGLLoadPolicy(toAPI(page), toAPI(url.impl()), m_client.base.clientInfo)); 984 985 return loadPolicy; 986 } 987 977 988 #endif // ENABLE(WEBGL) 978 989 }; -
trunk/Source/WebKit2/UIProcess/API/C/WKPageLoaderClient.h
r162912 r164451 46 46 kWKWebGLLoadPolicyBlocked = 0, 47 47 kWKWebGLLoadPolicyLoadNormally, 48 kWKWebGLLoadPolicyPending 48 49 }; 49 50 typedef uint32_t WKWebGLLoadPolicy; … … 331 332 // Version 4 332 333 WKPageWebGLLoadPolicyCallback webGLLoadPolicy; 334 WKPageWebGLLoadPolicyCallback resolveWebGLLoadPolicy; 333 335 } WKPageLoaderClientV4; 334 336 -
trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp
r164450 r164451 2752 2752 loadPolicy = static_cast<uint32_t>(m_loaderClient->webGLLoadPolicy(this, url)); 2753 2753 } 2754 2755 void WebPageProxy::resolveWebGLPolicyForURL(const String& url, uint32_t& loadPolicy) 2756 { 2757 loadPolicy = static_cast<uint32_t>(m_loaderClient->resolveWebGLLoadPolicy(this, url)); 2758 } 2754 2759 #endif // ENABLE(WEBGL) 2755 2760 -
trunk/Source/WebKit2/UIProcess/WebPageProxy.h
r164450 r164451 968 968 #if ENABLE(WEBGL) 969 969 void webGLPolicyForURL(const String& url, uint32_t& loadPolicy); 970 void resolveWebGLPolicyForURL(const String& url, uint32_t& loadPolicy); 970 971 #endif // ENABLE(WEBGL) 971 972 void setToolbarsAreVisible(bool toolbarsAreVisible); -
trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in
r164450 r164451 36 36 #if ENABLE(WEBGL) 37 37 WebGLPolicyForURL(String url) -> (uint32_t loadPolicy) 38 ResolveWebGLPolicyForURL(String url) -> (uint32_t loadPolicy) 38 39 #endif // ENABLE(WEBGL) 39 40 DidChangeViewportProperties(WebCore::ViewportAttributes attributes) -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
r164192 r164451 1349 1349 return webPage->webGLPolicyForURL(m_frame, url); 1350 1350 1351 return WebGLAllow; 1351 return WebGLAllowCreation; 1352 } 1353 1354 WebCore::WebGLLoadPolicy WebFrameLoaderClient::resolveWebGLPolicyForURL(const String& url) const 1355 { 1356 if (WebPage* webPage = m_frame->page()) 1357 return webPage->resolveWebGLPolicyForURL(m_frame, url); 1358 1359 return WebGLAllowCreation; 1352 1360 } 1353 1361 #endif // ENABLE(WEBGL) -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h
r164192 r164451 188 188 #if ENABLE(WEBGL) 189 189 virtual WebCore::WebGLLoadPolicy webGLPolicyForURL(const String&) const override; 190 virtual WebCore::WebGLLoadPolicy resolveWebGLPolicyForURL(const String&) const override; 190 191 #endif // ENABLE(WEBGL) 191 192 -
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
r164398 r164451 621 621 return static_cast<WebGLLoadPolicy>(policyResult); 622 622 623 return WebGLAllow; 623 return WebGLAllowCreation; 624 } 625 626 WebCore::WebGLLoadPolicy WebPage::resolveWebGLPolicyForURL(WebFrame* frame, const String& url) 627 { 628 uint32_t policyResult = 0; 629 630 if (sendSync(Messages::WebPageProxy::ResolveWebGLPolicyForURL(url), Messages::WebPageProxy::ResolveWebGLPolicyForURL::Reply(policyResult))) 631 return static_cast<WebGLLoadPolicy>(policyResult); 632 633 return WebGLAllowCreation; 624 634 } 625 635 #endif // ENABLE(WEBGL) -
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h
r164398 r164451 307 307 #if ENABLE(WEBGL) 308 308 WebCore::WebGLLoadPolicy webGLPolicyForURL(WebFrame*, const String&); 309 WebCore::WebGLLoadPolicy resolveWebGLPolicyForURL(WebFrame*, const String&); 309 310 #endif // ENABLE(WEBGL) 310 311 -
trunk/Tools/ChangeLog
r164379 r164451 1 2014-02-20 Dean Jackson <dino@apple.com> 2 3 Add an unresolved WebGLPolicy and an API to resolve it 4 https://bugs.webkit.org/show_bug.cgi?id=129109 5 6 Reviewed by Anders Carlsson. 7 8 Add a new entry for resolveWebGLLoadPolicy. 9 10 * WebKitTestRunner/TestController.cpp: 11 (WTR::TestController::createWebViewWithOptions): 12 1 13 2014-02-19 Gustavo Noronha Silva <gustavo.noronha@collabora.com> 2 14 -
trunk/Tools/WebKitTestRunner/TestController.cpp
r164295 r164451 477 477 pluginLoadPolicy, // pluginLoadPolicy 478 478 0, // webGLLoadPolicy 479 0, // resolveWebGLLoadPolicy 479 480 }; 480 481 WKPageSetPageLoaderClient(m_mainWebView->page(), &pageLoaderClient.base);
Note:
See TracChangeset
for help on using the changeset viewer.