Bug 116469
Summary: | Invalidate SVG filter results in SVGResourcesCache::clientLayoutChanged() | ||
---|---|---|---|
Product: | WebKit | Reporter: | Ryosuke Niwa <rniwa> |
Component: | SVG | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED CONFIGURATION CHANGED | ||
Severity: | Normal | CC: | ahmad.saleem792, ap, bfulgham, krit, mmaxfield, sabouhallawa, thorton, vitor.roriz, zalan, zimmermann |
Priority: | P2 | Keywords: | BlinkMergeCandidate |
Version: | 528+ (Nightly build) | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Ryosuke Niwa
We should probably merge
https://chromium.googlesource.com/chromium/blink/+/25d72ebd50bec9a4caa426e735e5ee7292c4da69
Invalidate SVG filter results in SVGResourcesCache::clientLayoutChanged().
This is a regression introduced by http://trac.webkit.org/changeset/103539.
For the SVG tree, filter result invalidation is handled by
RenderSVGResource::markForLayoutAndParentResourceInvalidation. But non-SVG content (such as
a <foreignObject> HTML subtree) does not call markForLayoutAndParentResourceInvalidation and
instead uses the regular setNeedsLayout() invalidation path.
Hence, changes in the HTML subtree do not invalidate cached results for filters applied on
ancestor SVG elements. In order to cover this case, clientLayoutChanged() needs to invalidate
filter results even if the SVG element itself does not need a re-layout. Note that prior to
http://trac.webkit.org/changeset/103539 the method used to do exactly that, but the branch was
removed on the assumption that markForLayoutAndParentResourceInvalidation() is already taking care
of it. Obviously, the assumption doesn’t hold for non-SVG content.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Ahmad Saleem
The line of code is following in Webkit GitHub source as of today:
https://github.com/WebKit/WebKit/blob/cdb0c4a68794035df705609ca0ec8c7fb373091b/Source/WebCore/rendering/svg/SVGResourcesCache.cpp#L100
________
if (renderer.selfNeedsLayout() && hasResourcesRequiringRemovalOnClientLayoutChange(*resources))
________
Chromium / Blink patch changed it to following:
if (object->selfNeedsLayout() || resources->filter())
_____
Is this needed anymore? Thanks!
Ahmad Saleem
This commit introduced:
https://github.com/WebKit/WebKit/commit/ce878379210ced398d994217e26519b433761149
hasResourcesRequiringRemovalOnClientLayoutChange
and it has "resources.filter()", which was added by Chromium / Blink patch.
I think this is not needed anymore. Please appreciate if someone can confirm. Thanks!