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

Issue 1583103007: Use an up-to-date canvas size when building canvas filters (Closed)

Created:
4 years, 11 months ago by ajuma
Modified:
4 years, 11 months ago
CC:
chromium-reviews, blink-reviews, ajuma+watch-canvas_chromium.org, Rik, dshwang
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Use an up-to-date canvas size when building canvas filters When canvas filters specify a filter primitive subregion (e.g. by specifying a width or height), filter building depends on having an up to date canvas size; otherwise, the crop rect computed for the filter is incorrect. This CL directly passes the canvas size to filter building code, rather than having the filter builder use a size from the layout tree, since the latter might be stale. BUG=561045 Committed: https://crrev.com/d69e12d35e3b986fe0ba40e04368f85cda57b99c Cr-Commit-Position: refs/heads/master@{#370047}

Patch Set 1 #

Patch Set 2 : #

Total comments: 2

Patch Set 3 : Pass size to filter builder instead of triggering layout #

Patch Set 4 : Remove unused function #

Total comments: 1

Messages

Total messages: 24 (9 generated)
ajuma
4 years, 11 months ago (2016-01-15 18:50:08 UTC) #4
Justin Novosad
https://codereview.chromium.org/1583103007/diff/20001/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp File third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp (right): https://codereview.chromium.org/1583103007/diff/20001/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp#newcode884 third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp:884: canvas()->document().updateLayoutIgnorePendingStylesheets(); This is a big hammer that may affect ...
4 years, 11 months ago (2016-01-15 21:16:28 UTC) #5
ajuma
https://codereview.chromium.org/1583103007/diff/20001/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp File third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp (right): https://codereview.chromium.org/1583103007/diff/20001/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp#newcode884 third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp:884: canvas()->document().updateLayoutIgnorePendingStylesheets(); On 2016/01/15 21:16:28, Justin Novosad wrote: > This ...
4 years, 11 months ago (2016-01-18 14:34:16 UTC) #6
Justin Novosad
On 2016/01/18 14:34:16, ajuma wrote: > https://codereview.chromium.org/1583103007/diff/20001/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp > File third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp > (right): > > https://codereview.chromium.org/1583103007/diff/20001/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp#newcode884 ...
4 years, 11 months ago (2016-01-18 16:10:49 UTC) #7
ajuma
On 2016/01/18 16:10:49, Justin Novosad wrote: > On 2016/01/18 14:34:16, ajuma wrote: > > > ...
4 years, 11 months ago (2016-01-18 18:45:29 UTC) #9
Justin Novosad
It's more complexity, but it looks like the right thing to do. Besides, the canvas ...
4 years, 11 months ago (2016-01-18 18:54:50 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1583103007/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1583103007/60001
4 years, 11 months ago (2016-01-18 19:02:15 UTC) #13
Justin Novosad
Just had a thought. Could you follow-up with additional layout tests that do essentially the ...
4 years, 11 months ago (2016-01-18 19:37:38 UTC) #14
ajuma
On 2016/01/18 19:37:38, Justin Novosad wrote: > Just had a thought. Could you follow-up with ...
4 years, 11 months ago (2016-01-18 19:38:28 UTC) #15
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 11 months ago (2016-01-18 20:39:10 UTC) #17
commit-bot: I haz the power
Failed to apply the patch.
4 years, 11 months ago (2016-01-18 20:39:31 UTC) #18
commit-bot: I haz the power
Patchset 4 (id:??) landed as https://crrev.com/d69e12d35e3b986fe0ba40e04368f85cda57b99c Cr-Commit-Position: refs/heads/master@{#370047}
4 years, 11 months ago (2016-01-18 20:40:09 UTC) #20
Stephen White
https://codereview.chromium.org/1583103007/diff/60001/third_party/WebKit/Source/core/layout/svg/ReferenceFilterBuilder.cpp File third_party/WebKit/Source/core/layout/svg/ReferenceFilterBuilder.cpp (right): https://codereview.chromium.org/1583103007/diff/60001/third_party/WebKit/Source/core/layout/svg/ReferenceFilterBuilder.cpp#newcode104 third_party/WebKit/Source/core/layout/svg/ReferenceFilterBuilder.cpp:104: if (referenceBoxSize) { Post-commit drive-by: should we just do ...
4 years, 11 months ago (2016-01-21 14:49:50 UTC) #22
Justin Novosad
On 2016/01/21 14:49:50, Stephen White wrote: > https://codereview.chromium.org/1583103007/diff/60001/third_party/WebKit/Source/core/layout/svg/ReferenceFilterBuilder.cpp > File third_party/WebKit/Source/core/layout/svg/ReferenceFilterBuilder.cpp > (right): > > ...
4 years, 11 months ago (2016-01-21 15:35:08 UTC) #23
ajuma
4 years, 11 months ago (2016-01-21 15:58:29 UTC) #24
Message was sent while issue was closed.
On 2016/01/21 15:35:08, Justin Novosad wrote:
> On 2016/01/21 14:49:50, Stephen White wrote:
> >
>
https://codereview.chromium.org/1583103007/diff/60001/third_party/WebKit/Sour...
> > File third_party/WebKit/Source/core/layout/svg/ReferenceFilterBuilder.cpp
> > (right):
> > 
> >
>
https://codereview.chromium.org/1583103007/diff/60001/third_party/WebKit/Sour...
> > third_party/WebKit/Source/core/layout/svg/ReferenceFilterBuilder.cpp:104: if
> > (referenceBoxSize) {
> > Post-commit drive-by: should we just do this check outside the element
layout
> > checks? I'm guessing it's valid even for canvas elements which aren't in the
> DOM
> > and won't get layout.
> 
> That is a really good point. Ali, we need to support the case where the canvas
> is not attached to the DOM (document.createElement('canvas')...)

Thanks for spotting this! Fix posted here:
https://codereview.chromium.org/1613193002/

Powered by Google App Engine
This is Rietveld 408576698