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

Issue 389273002: Fix copyImage for WebGL elements. (Closed)

Created:
6 years, 5 months ago by hj.r.chung
Modified:
6 years, 5 months ago
CC:
blink-reviews, dglazkov+blink, blink-reviews-html_chromium.org, groby+blinkspell_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Project:
blink
Visibility:
Public.

Description

Fix copyImage for WebGL elements. "Copy image" menu item crashes on WebGL elements because the copiedImage in HTMLCanvasElement gets cleared before it can be copied to the clipboard. Also fixed HTMLCanvasElement::copiedImage() so that the copy is done on the latest frame composited to the screen. BUG=392765 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=178508

Patch Set 1 #

Patch Set 2 : added layout test #

Patch Set 3 : added test for negative input #

Total comments: 2

Patch Set 4 : seperated negative test #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+144 lines, -7 lines) Patch
A LayoutTests/compositing/copy-image-when-no-image-exists.html View 1 2 3 1 chunk +49 lines, -0 lines 1 comment Download
A + LayoutTests/compositing/copy-image-when-no-image-exists-expected.txt View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
A LayoutTests/compositing/webgl/webgl-copy-image.html View 1 2 3 1 chunk +78 lines, -0 lines 0 comments Download
A LayoutTests/compositing/webgl/webgl-copy-image-expected.txt View 1 3 1 chunk +7 lines, -0 lines 0 comments Download
M Source/core/editing/Editor.cpp View 2 chunks +3 lines, -3 lines 0 comments Download
M Source/core/html/HTMLCanvasElement.cpp View 1 chunk +4 lines, -1 line 0 comments Download
M Source/platform/graphics/gpu/DrawingBuffer.cpp View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 15 (0 generated)
hj.r.chung
PTAL!
6 years, 5 months ago (2014-07-14 10:13:39 UTC) #1
Ken Russell (switch to Gerrit)
Thanks, the code changes look fine, but where are the tests? Without a test, this ...
6 years, 5 months ago (2014-07-14 17:59:21 UTC) #2
Ken Russell (switch to Gerrit)
To be more concrete: if it's not currently possible to write tests for the "Save ...
6 years, 5 months ago (2014-07-14 22:13:15 UTC) #3
hj.r.chung
On 2014/07/14 22:13:15, Ken Russell wrote: > To be more concrete: if it's not currently ...
6 years, 5 months ago (2014-07-15 02:54:55 UTC) #4
hj.r.chung
added layout test for copy image now depends on chromium side change https://codereview.chromium.org/396953002/ PTAL!
6 years, 5 months ago (2014-07-16 11:29:19 UTC) #5
Ken Russell (switch to Gerrit)
The code change and this test look good. Please write another layout test that verifies ...
6 years, 5 months ago (2014-07-16 20:43:16 UTC) #6
Ken Russell (switch to Gerrit)
Please split off the negative test into another layout test. It can be much simpler ...
6 years, 5 months ago (2014-07-17 21:32:31 UTC) #7
hj.r.chung
I uploaded a patch for splitting the tests. PTAL! https://codereview.chromium.org/389273002/diff/130001/LayoutTests/compositing/webgl/webgl-copy-image.html File LayoutTests/compositing/webgl/webgl-copy-image.html (right): https://codereview.chromium.org/389273002/diff/130001/LayoutTests/compositing/webgl/webgl-copy-image.html#newcode77 LayoutTests/compositing/webgl/webgl-copy-image.html:77: ...
6 years, 5 months ago (2014-07-18 06:31:39 UTC) #8
Ken Russell (switch to Gerrit)
Very nice. Thank you for persisting with this change. LGTM https://codereview.chromium.org/389273002/diff/170001/LayoutTests/compositing/copy-image-when-no-image-exists.html File LayoutTests/compositing/copy-image-when-no-image-exists.html (right): https://codereview.chromium.org/389273002/diff/170001/LayoutTests/compositing/copy-image-when-no-image-exists.html#newcode34 ...
6 years, 5 months ago (2014-07-18 23:33:29 UTC) #9
Ken Russell (switch to Gerrit)
The CQ bit was checked by kbr@chromium.org
6 years, 5 months ago (2014-07-18 23:33:32 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/heejin.r.chung@samsung.com/389273002/170001
6 years, 5 months ago (2014-07-18 23:33:57 UTC) #11
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: win_blink_rel on tryserver.blink ...
6 years, 5 months ago (2014-07-19 00:45:56 UTC) #12
commit-bot: I haz the power
Change committed as 178508
6 years, 5 months ago (2014-07-19 02:17:43 UTC) #13
hj.r.chung
On 2014/07/18 23:33:29, Ken Russell wrote: > Very nice. Thank you for persisting with this ...
6 years, 5 months ago (2014-07-20 15:26:27 UTC) #14
hj.r.chung
6 years, 5 months ago (2014-07-20 15:28:05 UTC) #15
Message was sent while issue was closed.
On 2014/07/20 15:26:27, hj.r.chung wrote:
> On 2014/07/18 23:33:29, Ken Russell wrote:
> > Very nice. Thank you for persisting with this change. LGTM
> > 
> >
>
https://codereview.chromium.org/389273002/diff/170001/LayoutTests/compositing...
> > File LayoutTests/compositing/copy-image-when-no-image-exists.html (right):
> > 
> >
>
https://codereview.chromium.org/389273002/diff/170001/LayoutTests/compositing...
> > LayoutTests/compositing/copy-image-when-no-image-exists.html:34:
> > shouldBeEqualToNumber("height", 0);
> > Ideally this would test the value of "snapshot", too.
> 
> Th

Oops, this was supposed to be "Thank you! and I'll try to add checking the
snapshot value soon "

Powered by Google App Engine
This is Rietveld 408576698