Add an unresolved WebGLPolicy and an API to resolve it
authordino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 20 Feb 2014 23:11:52 +0000 (23:11 +0000)
committerdino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 20 Feb 2014 23:11:52 +0000 (23:11 +0000)
commit3784d4294cbc1a35d2258453b02e0be828f1e28b
tree2ca2f3fef05ca3c83d754bab14b7c1014aad00a1
parent980bb5acf3a012721d24b5bd3a35b64999505fa3
Add an unresolved WebGLPolicy and an API to resolve it
https://bugs.webkit.org/show_bug.cgi?id=129109

Reviewed by Anders Carlsson.

Source/WebCore:

Add a third WebGLLoadPolicy which is "pending" allowing the page
to go ahead with creating the WebGLRenderingContext and resolve the policy
at a later time. Add a new API resolveWebGLLoadPolicy to do the resolution.

* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::getContext): WebGLBlock -> WebGLBlockCreation
* loader/FrameLoaderClient.h:
(WebCore::FrameLoaderClient::webGLPolicyForURL): WebGLAllow -> WebGLAllowCreation.
(WebCore::FrameLoaderClient::resolveWebGLPolicyForURL): New method.
* loader/FrameLoaderTypes.h: Add WebGLPendingCreation.

Source/WebKit2:

Add a third WebGLLoadPolicy which is "pending" allowing the page
to go ahead with creating the WebGLRenderingContext and resolve the policy
at a later time. Add a new API resolveWebGLLoadPolicy to do the resolution.

* UIProcess/API/APILoaderClient.h:
(API::LoaderClient::webGLLoadPolicy): New return value.
(API::LoaderClient::resolveWebGLLoadPolicy): New method definition.
* UIProcess/API/C/WKAPICast.h:
(WebKit::toWebGLLoadPolicy): Change names of return types.
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageLoaderClient): New stubs.
* UIProcess/API/C/WKPageLoaderClient.h: New policy type kWKWebGLLoadPolicyPending.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::resolveWebGLPolicyForURL): New method.
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in: New message.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::webGLPolicyForURL):
(WebKit::WebFrameLoaderClient::resolveWebGLPolicyForURL):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::webGLPolicyForURL):
(WebKit::WebPage::resolveWebGLPolicyForURL):
* WebProcess/WebPage/WebPage.h:

Tools:

Add a new entry for resolveWebGLLoadPolicy.

* WebKitTestRunner/TestController.cpp:
(WTR::TestController::createWebViewWithOptions):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@164451 268f45cc-cd09-0410-ab3c-d52691b4dbfc
18 files changed:
Source/WebCore/ChangeLog
Source/WebCore/html/HTMLCanvasElement.cpp
Source/WebCore/loader/FrameLoaderClient.h
Source/WebCore/loader/FrameLoaderTypes.h
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/APILoaderClient.h
Source/WebKit2/UIProcess/API/C/WKAPICast.h
Source/WebKit2/UIProcess/API/C/WKPage.cpp
Source/WebKit2/UIProcess/API/C/WKPageLoaderClient.h
Source/WebKit2/UIProcess/WebPageProxy.cpp
Source/WebKit2/UIProcess/WebPageProxy.h
Source/WebKit2/UIProcess/WebPageProxy.messages.in
Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h
Source/WebKit2/WebProcess/WebPage/WebPage.cpp
Source/WebKit2/WebProcess/WebPage/WebPage.h
Tools/ChangeLog
Tools/WebKitTestRunner/TestController.cpp