Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(122)

Issue 1573173002: Make WebGL's texImage2D and texSubImage2D handle cross-origin ImageBitmap (Closed)

Created:
4 years, 11 months ago by xidachen
Modified:
4 years, 11 months ago
CC:
chromium-reviews, blink-reviews, bajones, Zhenyao Mo
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make WebGL's texImage2D and texSubImage2D handle cross-origin ImageBitmap Now that ImageBitmap has an origin-clean flag, this CL changes WebGL's texImage2D(ImageBitmap) and texSubImage2D(ImageBitmap) so that it will throw a security error when the ImageBitmap is not origin clean. Also, a small change has been made to texImage2D::validateTexFunc. BUG=576280 Committed: https://crrev.com/7f6ec1189d09fcf01cf6d4ea41ed43ec91dfdbac Cr-Commit-Position: refs/heads/master@{#369025}

Patch Set 1 #

Total comments: 2

Patch Set 2 : add validateImageBitmap helper function & a layout test #

Total comments: 4

Patch Set 3 : layout tests includes both origin-clean and tainted-origin imagebitmap #

Total comments: 12

Patch Set 4 : update layout test #

Patch Set 5 : layout test passed :) #

Total comments: 1

Messages

Total messages: 20 (5 generated)
xidachen
PTAL
4 years, 11 months ago (2016-01-11 16:17:44 UTC) #2
Justin Novosad
Missing a test. https://codereview.chromium.org/1573173002/diff/1/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp File third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp (right): https://codereview.chromium.org/1573173002/diff/1/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp#newcode4516 third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp:4516: if (!bitmap->originClean()) { Could you factor ...
4 years, 11 months ago (2016-01-11 17:52:13 UTC) #3
xidachen
PTAL. We have to wait until this CL: https://codereview.chromium.org/1532473002/ gets landed.
4 years, 11 months ago (2016-01-11 20:37:16 UTC) #4
Justin Novosad
https://codereview.chromium.org/1573173002/diff/20001/third_party/WebKit/LayoutTests/http/tests/security/webgl-cross-origin-ImageBitmap-blocked.html File third_party/WebKit/LayoutTests/http/tests/security/webgl-cross-origin-ImageBitmap-blocked.html (right): https://codereview.chromium.org/1573173002/diff/20001/third_party/WebKit/LayoutTests/http/tests/security/webgl-cross-origin-ImageBitmap-blocked.html#newcode6 third_party/WebKit/LayoutTests/http/tests/security/webgl-cross-origin-ImageBitmap-blocked.html:6: description("WebGL's texImage2D should throw security error when the ImageBitmap ...
4 years, 11 months ago (2016-01-11 21:08:53 UTC) #5
Justin Novosad
On 2016/01/11 21:08:53, Justin Novosad wrote: > Also, > please add a second "shouldThrow" that ...
4 years, 11 months ago (2016-01-11 21:11:03 UTC) #6
xidachen
PTAL. https://codereview.chromium.org/1573173002/diff/20001/third_party/WebKit/LayoutTests/http/tests/security/webgl-cross-origin-ImageBitmap-blocked.html File third_party/WebKit/LayoutTests/http/tests/security/webgl-cross-origin-ImageBitmap-blocked.html (right): https://codereview.chromium.org/1573173002/diff/20001/third_party/WebKit/LayoutTests/http/tests/security/webgl-cross-origin-ImageBitmap-blocked.html#newcode6 third_party/WebKit/LayoutTests/http/tests/security/webgl-cross-origin-ImageBitmap-blocked.html:6: description("WebGL's texImage2D should throw security error when the ...
4 years, 11 months ago (2016-01-12 02:35:50 UTC) #7
Ken Russell (switch to Gerrit)
Nice work overall. Couple of issues with the test. https://codereview.chromium.org/1573173002/diff/40001/third_party/WebKit/LayoutTests/http/tests/security/webgl-cross-origin-ImageBitmap-blocked.html File third_party/WebKit/LayoutTests/http/tests/security/webgl-cross-origin-ImageBitmap-blocked.html (right): https://codereview.chromium.org/1573173002/diff/40001/third_party/WebKit/LayoutTests/http/tests/security/webgl-cross-origin-ImageBitmap-blocked.html#newcode23 third_party/WebKit/LayoutTests/http/tests/security/webgl-cross-origin-ImageBitmap-blocked.html:23: ...
4 years, 11 months ago (2016-01-12 05:03:22 UTC) #8
xidachen
Hi Ken, Thank you for the comments. I made changes accordingly. But now I am ...
4 years, 11 months ago (2016-01-12 13:58:37 UTC) #9
Ken Russell (switch to Gerrit)
On 2016/01/12 13:58:37, xidachen wrote: > Hi Ken, > > Thank you for the comments. ...
4 years, 11 months ago (2016-01-12 19:28:57 UTC) #10
Justin Novosad
FYI: In WebGL2 there is texSubImage3D that needs to be taken care of.
4 years, 11 months ago (2016-01-12 19:58:06 UTC) #11
xidachen
Hi Ken, Please take a look. I made a change in texImage2D::validateTexFunc, and it should ...
4 years, 11 months ago (2016-01-12 20:26:02 UTC) #13
Ken Russell (switch to Gerrit)
Very good. LGTM
4 years, 11 months ago (2016-01-12 21:19:35 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1573173002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1573173002/80001
4 years, 11 months ago (2016-01-12 21:23:42 UTC) #16
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 11 months ago (2016-01-12 23:09:10 UTC) #18
commit-bot: I haz the power
4 years, 11 months ago (2016-01-12 23:10:05 UTC) #20
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/7f6ec1189d09fcf01cf6d4ea41ed43ec91dfdbac
Cr-Commit-Position: refs/heads/master@{#369025}

Powered by Google App Engine
This is Rietveld 408576698