Bug 127000

Summary: Remove unnecessary call to webGLContextCreated
Product: WebKit Reporter: Roger Fong <roger_fong>
Component: WebGLAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, commit-queue, dino, esprehn+autocc, gyuyoung.kim, japhet, jonlee, roger_fong
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
patch none

Description Roger Fong 2014-01-14 12:51:50 PST
If the WebKit client hasn't implemented webGLContextCreated then we don't want to return early and we want to continue execution as usual.

This is causing 7 tests to fail which I will skip for now.
http/tests/canvas/webgl/origin-clean-conformance.html
http/tests/webgl/1.0.2/texSubImage2DHTML.html
http/tests/security/webgl-remote-read-remote-image-allowed.html
http/tests/security/webgl-remote-read-remote-image-allowed-with-credentials.html
http/tests/webgl/1.0.2/texImage2DHTML.html
http/tests/security/webgl-remote-read-remote-image-blocked-no-crossorigin.html

Note that other webgl tests aren't failing because those tests are local files, not hosted from a server like these http tests are.
Comment 1 Roger Fong 2014-01-14 13:42:27 PST
tests skipped r162002
Comment 2 Roger Fong 2014-01-14 13:58:32 PST
One way to do this would be to use a sendSync and wait for webGLContextCreated to return true or false based on whether or not we want the dialog to show up.
It will return false if the method has not implemented in the WebKit client.

Perhaps another way is upon initialization of the client, have the client send a message to webkit that sets a flag saying whether or not we need to call webGLContextCreated.
Comment 3 Roger Fong 2014-01-14 14:55:53 PST
<rdar://problem/15818843>
Comment 4 Roger Fong 2014-01-15 13:59:41 PST
I just need the default load policy to be set to allowing.
If the client does not have the method implemented then by default the returned policy will be to allow and everything will run as expected.

Keeping this bug open to land unskips
Comment 5 Roger Fong 2014-01-15 15:06:56 PST
Created attachment 221310 [details]
patch
Comment 6 Roger Fong 2014-01-15 15:07:48 PST
This patch will resolve the issue of other ports breaking.
It also will eliminate WebGLContextCreated, which means one less message to send to the UIProcess.
Comment 7 Roger Fong 2014-01-15 15:13:23 PST
O it also resolves the issue in http://trac.webkit.org/changeset/162002 where I had to skip a bunch of WebGL Http tests
Comment 8 Brent Fulgham 2014-01-15 15:33:32 PST
Comment on attachment 221310 [details]
patch

r=me
Comment 9 WebKit Commit Bot 2014-01-15 16:02:51 PST
Comment on attachment 221310 [details]
patch

Clearing flags on attachment: 221310

Committed r162099: <http://trac.webkit.org/changeset/162099>
Comment 10 WebKit Commit Bot 2014-01-15 16:02:54 PST
All reviewed patches have been landed.  Closing bug.