Bug 130162 - [WebGL] WebKit1 + WebKit2 iOS clients should check load policy
Summary: [WebGL] WebKit1 + WebKit2 iOS clients should check load policy
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGL (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Dean Jackson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-12 15:40 PDT by Dean Jackson
Modified: 2014-03-12 17:07 PDT (History)
0 users

See Also:


Attachments
Patch (9.00 KB, patch)
2014-03-12 15:45 PDT, Dean Jackson
simon.fraser: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dean Jackson 2014-03-12 15:40:25 PDT
Make all WK1 clients and iOS WK2 clients check the WebGL load policy.
Comment 1 Dean Jackson 2014-03-12 15:45:44 PDT
Created attachment 226556 [details]
Patch
Comment 2 Simon Fraser (smfr) 2014-03-12 16:36:47 PDT
Comment on attachment 226556 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=226556&action=review

> Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h:205
> +    virtual WebCore::WebGLLoadPolicy webGLPolicyForURL(const String&) const override;
> +    virtual WebCore::WebGLLoadPolicy resolveWebGLPolicyForURL(const String&) const override;

I hope the difference between these two is explained in a comment in the base class becuase it's not obvious.

> Source/WebKit2/WebProcess/WebPage/WebPage.cpp:622
> +#if ENABLE(WEBGL) && !PLATFORM(MAC) && !PLATFORM(IOS)

!PLATFORM(COCOA)?

> Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:1767
> +    return WKShouldBlockWebGL() ? WebGLBlockCreation : WebGLAllowCreation;

UNUSED_PARAM() for frame and url?

> Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:1772
> +WebCore::WebGLLoadPolicy WebPage::resolveWebGLPolicyForURL(WebFrame* frame, const String& url)
> +{
> +    return WKShouldBlockWebGL() ? WebGLBlockCreation : WebGLAllowCreation;

Ditto.
Comment 3 Dean Jackson 2014-03-12 16:58:46 PDT
(In reply to comment #2)
> !PLATFORM(COCOA)?

Done.

> UNUSED_PARAM() for frame and url?

Just removed them.
Comment 4 Dean Jackson 2014-03-12 17:07:14 PDT
Committed r165514: <http://trac.webkit.org/changeset/165514>