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

Issue 2401343002: Tracking filter mutation via SVGElementProxy (Closed)

Created:
4 years, 2 months ago by fs
Modified:
4 years, 1 month ago
Reviewers:
pdr., esprehn
CC:
ajuma+watch-canvas_chromium.org, darktears, apavlov+blink_chromium.org, blink-reviews, blink-reviews-css, blink-reviews-dom_chromium.org, blink-reviews-layout_chromium.org, blink-reviews-paint_chromium.org, blink-reviews-style_chromium.org, Rik, chromium-reviews, dglazkov+blink, dshwang, krit, eae+blinkwatch, f(malita), gavinp+loader_chromium.org, gyuyoung2, haraken, Nate Chapin, jchaffraix+rendering, Justin Novosad, kouhei+svg_chromium.org, leviw+renderwatch, loading-reviews+fetch_chromium.org, pdr+svgwatchlist_chromium.org, pdr+renderingwatchlist_chromium.org, rwlbuis, Stephen Chennney, sof, szager+layoutwatch_chromium.org, tyoshino+watch_chromium.org, zoltan1
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Tracking reference filter mutation via SVGElementProxy This introduces SVGElementProxy - a new piece with the functionality of DocumentResourceReference and the ReferenceFilterBuilder merged. It provides the means to track clients of a certain element (only SVGFilterElements for now, but will likely be extended to other types if it ends up sticking.) An SVGElementProxy is created, and primarily owned, by CSSURIValue. The proxy also handles loading of a resource document, if requested. Clients are SVGResourceClients, like before, with methods/callbacks renamed. Some of the old functionality of SVGResourceClient has either been moved to clients, to the proxy or been replaced with different solutions. Mutations to the element/subtree is signaled separately from any potential changes to the actual reference (anything that might invalidate the element reference.) BUG=439970 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 Committed: https://crrev.com/d36f8a8c9c4b7d757c0d8832e624be80c4465991 Cr-Commit-Position: refs/heads/master@{#430550}

Patch Set 1 #

Patch Set 2 : Rebase #

Patch Set 3 : Change caching avoidance; fix (restore) canvas add/remove order. #

Patch Set 4 : Rebase; fix DCHECK #

Patch Set 5 : Rebase #

Total comments: 30

Patch Set 6 : Touchups #

Total comments: 4

Patch Set 7 : Extend documentation for SVGElementProxy #

Patch Set 8 : referenceChanged -> proxiedElementChanged #

Total comments: 16

Patch Set 9 : Rewrite SVGElementProxy to eliminate generations; Other review feedback. #

Patch Set 10 : Fix fullscreen #

Total comments: 11

Patch Set 11 : Rebase; Don't register TreeScope clients on external documents; Comment fixups #

Patch Set 12 : Rebase; Add lifecycle checks #

Patch Set 13 : Tweak lifecycle checks #

Total comments: 4

Patch Set 14 : Fix auto usage; drop possibly incorrect DCHECK. #

Patch Set 15 : Remove DeprecatedScheduleStyleRecalcDuringLayout include #

Patch Set 16 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+594 lines, -694 lines) Patch
M third_party/WebKit/Source/core/css/CSSURIValue.h View 1 2 3 4 5 6 7 8 1 chunk +5 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/core/css/CSSURIValue.cpp View 1 2 3 4 5 6 7 8 2 chunks +15 lines, -15 lines 0 comments Download
M third_party/WebKit/Source/core/css/resolver/ElementStyleResources.h View 1 2 3 4 5 6 7 8 3 chunks +2 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/css/resolver/ElementStyleResources.cpp View 1 2 3 4 5 6 7 8 3 chunks +11 lines, -24 lines 0 comments Download
M third_party/WebKit/Source/core/css/resolver/FilterOperationResolver.cpp View 1 2 3 4 5 6 7 8 2 chunks +4 lines, -15 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Document.h View 1 2 3 4 5 6 7 8 9 10 11 14 15 4 chunks +0 lines, -12 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Document.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +0 lines, -31 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Element.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +0 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Element.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +1 line, -9 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Node.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +14 lines, -25 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Node.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +0 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/dom/StyleChangeReason.h View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/dom/StyleChangeReason.cpp View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/fetch/BUILD.gn View 1 chunk +0 lines, -1 line 0 comments Download
D third_party/WebKit/Source/core/fetch/DocumentResourceReference.h View 1 chunk +0 lines, -62 lines 0 comments Download
M third_party/WebKit/Source/core/frame/FrameView.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +0 lines, -13 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/svg/BUILD.gn View 1 chunk +0 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceContainer.h View 1 2 3 4 5 6 7 8 9 10 4 chunks +5 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceContainer.cpp View 1 2 3 4 5 6 7 8 7 chunks +19 lines, -46 lines 0 comments Download
M third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceFilter.h View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceFilter.cpp View 1 2 3 4 5 2 chunks +5 lines, -1 line 0 comments Download
D third_party/WebKit/Source/core/layout/svg/ReferenceFilterBuilder.h View 1 chunk +0 lines, -60 lines 0 comments Download
D third_party/WebKit/Source/core/layout/svg/ReferenceFilterBuilder.cpp View 1 chunk +0 lines, -95 lines 0 comments Download
M third_party/WebKit/Source/core/paint/FilterEffectBuilder.cpp View 1 2 3 4 5 6 7 8 2 chunks +7 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/core/paint/PaintLayer.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 6 chunks +2 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/core/paint/PaintLayer.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 11 chunks +31 lines, -73 lines 0 comments Download
M third_party/WebKit/Source/core/paint/PaintLayerFilterInfo.h View 1 2 3 4 5 6 7 8 2 chunks +6 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/paint/PaintLayerFilterInfo.cpp View 1 2 3 4 5 6 7 8 9 2 chunks +22 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/core/style/FilterOperation.h View 1 2 3 4 5 6 7 8 3 chunks +13 lines, -14 lines 0 comments Download
M third_party/WebKit/Source/core/style/FilterOperation.cpp View 1 2 3 4 5 6 7 8 3 chunks +22 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/style/FilterOperations.h View 2 chunks +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/style/FilterOperations.cpp View 2 chunks +14 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/svg/BUILD.gn View 2 chunks +3 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/svg/SVGDocumentExtensions.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +3 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/svg/SVGDocumentExtensions.cpp View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +0 lines, -1 line 0 comments Download
A third_party/WebKit/Source/core/svg/SVGElementProxy.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +138 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/svg/SVGElementProxy.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +193 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/svg/SVGFilterElement.h View 1 2 3 4 5 3 chunks +3 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/svg/SVGFilterElement.cpp View 1 2 3 4 5 4 chunks +7 lines, -17 lines 0 comments Download
M third_party/WebKit/Source/core/svg/SVGResourceClient.h View 1 2 3 4 5 6 7 8 1 chunk +9 lines, -18 lines 0 comments Download
D third_party/WebKit/Source/core/svg/SVGResourceClient.cpp View 1 chunk +0 lines, -86 lines 0 comments Download
M third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.h View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +8 lines, -1 line 0 comments Download
M third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +23 lines, -1 line 0 comments Download
M third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DState.cpp View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +1 line, -9 lines 0 comments Download

Messages

Total messages: 102 (76 generated)
fs
I think I've noodled over this long enough, and it seems to settling as to ...
4 years, 2 months ago (2016-10-18 14:52:36 UTC) #23
pdr.
https://codereview.chromium.org/2401343002/diff/80001/third_party/WebKit/Source/core/css/resolver/ElementStyleResources.cpp File third_party/WebKit/Source/core/css/resolver/ElementStyleResources.cpp (right): https://codereview.chromium.org/2401343002/diff/80001/third_party/WebKit/Source/core/css/resolver/ElementStyleResources.cpp#newcode118 third_party/WebKit/Source/core/css/resolver/ElementStyleResources.cpp:118: if (!computedStyle->hasFilter()) Looking at the comment about images in ...
4 years, 2 months ago (2016-10-20 03:11:05 UTC) #27
fs
https://codereview.chromium.org/2401343002/diff/80001/third_party/WebKit/Source/core/css/resolver/ElementStyleResources.cpp File third_party/WebKit/Source/core/css/resolver/ElementStyleResources.cpp (right): https://codereview.chromium.org/2401343002/diff/80001/third_party/WebKit/Source/core/css/resolver/ElementStyleResources.cpp#newcode118 third_party/WebKit/Source/core/css/resolver/ElementStyleResources.cpp:118: if (!computedStyle->hasFilter()) On 2016/10/20 at 03:11:04, pdr. wrote: > ...
4 years, 2 months ago (2016-10-20 11:28:00 UTC) #30
pdr.
Very nice! A couple more requests for comments to help future readers. I think this ...
4 years, 2 months ago (2016-10-20 19:03:42 UTC) #33
fs
On 2016/10/20 at 19:03:42, pdr wrote: > Very nice! A couple more requests for comments ...
4 years, 2 months ago (2016-10-21 11:17:12 UTC) #39
pdr.
LGTM here, but please wait for a second review from someone more familiar with CSS ...
4 years, 1 month ago (2016-10-24 17:02:23 UTC) #43
esprehn
This doesn't remove the usage of scheduleSVGFilterLayerUpdateHack() in the paint invalidation code. I'm worried we're ...
4 years, 1 month ago (2016-10-25 01:18:43 UTC) #44
fs
(Haven't uploaded new PS, will do that when I've had the time to do something ...
4 years, 1 month ago (2016-10-25 15:00:53 UTC) #45
fs
I've reworked things to try and address esprehn's comments. Primarily by using an IdTargetObserver to ...
4 years, 1 month ago (2016-11-01 14:20:02 UTC) #55
pdr.
https://codereview.chromium.org/2401343002/diff/180001/third_party/WebKit/Source/core/dom/Document.h File third_party/WebKit/Source/core/dom/Document.h (left): https://codereview.chromium.org/2401343002/diff/180001/third_party/WebKit/Source/core/dom/Document.h#oldcode476 third_party/WebKit/Source/core/dom/Document.h:476: void scheduleSVGFilterLayerUpdateHack(Element&); Woooooooooooooohoooooooooooooo!!! https://codereview.chromium.org/2401343002/diff/180001/third_party/WebKit/Source/core/paint/PaintLayer.cpp File third_party/WebKit/Source/core/paint/PaintLayer.cpp (right): https://codereview.chromium.org/2401343002/diff/180001/third_party/WebKit/Source/core/paint/PaintLayer.cpp#newcode3076 third_party/WebKit/Source/core/paint/PaintLayer.cpp:3076: ...
4 years, 1 month ago (2016-11-02 06:35:22 UTC) #56
fs
https://codereview.chromium.org/2401343002/diff/180001/third_party/WebKit/Source/core/paint/PaintLayer.cpp File third_party/WebKit/Source/core/paint/PaintLayer.cpp (right): https://codereview.chromium.org/2401343002/diff/180001/third_party/WebKit/Source/core/paint/PaintLayer.cpp#newcode3076 third_party/WebKit/Source/core/paint/PaintLayer.cpp:3076: lastFilterEffect(); On 2016/11/02 at 06:35:22, pdr. wrote: > I ...
4 years, 1 month ago (2016-11-02 15:49:22 UTC) #61
pdr.
@esprehn, can you give this another review too? > https://codereview.chromium.org/2401343002/diff/180001/third_party/WebKit/Source/core/svg/SVGElementProxy.cpp#newcode16 > third_party/WebKit/Source/core/svg/SVGElementProxy.cpp:16: > On 2016/11/02 ...
4 years, 1 month ago (2016-11-02 20:51:30 UTC) #62
fs
On 2016/11/02 at 20:51:30, pdr wrote: > @esprehn, can you give this another review too? ...
4 years, 1 month ago (2016-11-03 16:08:52 UTC) #69
fs
On 2016/11/02 at 20:51:30, pdr wrote: > @esprehn, can you give this another review too? ...
4 years, 1 month ago (2016-11-04 15:24:46 UTC) #72
esprehn
lgtm w/ some nits and comments. I think that lifecycle assert might be wrong? https://codereview.chromium.org/2401343002/diff/240001/third_party/WebKit/Source/core/svg/SVGElementProxy.cpp ...
4 years, 1 month ago (2016-11-04 23:58:07 UTC) #73
pdr.
LGTM here too
4 years, 1 month ago (2016-11-05 00:22:06 UTC) #74
fs
https://codereview.chromium.org/2401343002/diff/240001/third_party/WebKit/Source/core/svg/SVGElementProxy.cpp File third_party/WebKit/Source/core/svg/SVGElementProxy.cpp (right): https://codereview.chromium.org/2401343002/diff/240001/third_party/WebKit/Source/core/svg/SVGElementProxy.cpp#newcode56 third_party/WebKit/Source/core/svg/SVGElementProxy.cpp:56: DCHECK(lifecycle().state() <= DocumentLifecycle::CompositingClean || On 2016/11/04 at 23:58:07, esprehn ...
4 years, 1 month ago (2016-11-07 12:59:20 UTC) #77
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2401343002/280001
4 years, 1 month ago (2016-11-08 08:42:08 UTC) #86
commit-bot: I haz the power
Committed patchset #15 (id:280001)
4 years, 1 month ago (2016-11-08 08:48:44 UTC) #87
commit-bot: I haz the power
Patchset 15 (id:??) landed as https://crrev.com/d36f8a8c9c4b7d757c0d8832e624be80c4465991 Cr-Commit-Position: refs/heads/master@{#430550}
4 years, 1 month ago (2016-11-08 08:50:36 UTC) #89
pdr.
On 2016/11/08 at 08:50:36, commit-bot wrote: > Patchset 15 (id:??) landed as https://crrev.com/d36f8a8c9c4b7d757c0d8832e624be80c4465991 > Cr-Commit-Position: ...
4 years, 1 month ago (2016-11-08 19:28:36 UTC) #90
pdr.
A revert of this CL (patchset #15 id:280001) has been created in https://codereview.chromium.org/2482353002/ by pdr@chromium.org. ...
4 years, 1 month ago (2016-11-09 00:47:08 UTC) #91
fs
On 2016/11/09 at 00:47:08, pdr wrote: > A revert of this CL (patchset #15 id:280001) ...
4 years, 1 month ago (2016-11-09 11:43:42 UTC) #92
fs
On 2016/11/09 at 00:47:08, pdr wrote: > A revert of this CL (patchset #15 id:280001) ...
4 years, 1 month ago (2016-11-09 17:25:47 UTC) #96
pdr.
On 2016/11/09 at 17:25:47, fs wrote: > On 2016/11/09 at 00:47:08, pdr wrote: > > ...
4 years, 1 month ago (2016-11-09 18:42:23 UTC) #97
fs
4 years, 1 month ago (2016-11-10 09:07:01 UTC) #100
On 2016/11/09 at 18:42:23, pdr wrote:
> On 2016/11/09 at 17:25:47, fs wrote:
> > On 2016/11/09 at 00:47:08, pdr wrote:
> > > A revert of this CL (patchset #15 id:280001) has been created in
https://codereview.chromium.org/2482353002/ by pdr@chromium.org.
> > > 
> > > The reason for reverting is: There are several reports of issues from this
patch. Lets go ahead and roll out for now.
> > > 
> > > BUG=663362,663444,663473,663362.
> > 
> > Looks like all of these was the same underlying cause - a bug in client
unregistration. Hopefully fixed now (SVGElementProxy::removeClient), and I
simplified local vs. remote handling a bit in addClient/removeClient while at
it. Added two tests based on the bug reports (different crash stacks so figured
it'd be good to keep one of each just in case.)
> > 
> > Permission to reland?
> 
> LGTM to reland. Do you mind creating a new review for it though, and post a
link here?
> 
> Sorry about making you go through the CQ twice :( I think the two reviews will
help keep this separated if it has to be rolled out again.

Done here: https://codereview.chromium.org/2490163002

Powered by Google App Engine
This is Rietveld 408576698