Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 34cb73b0f69df082842d0ab58ae7a05a530afba7
https://github.com/WebKit/WebKit/commit/34cb73b0f69df082842d0ab58ae7a05a530afba7
Author: Ahmad Saleem <[email protected]>
Date: 2024-03-28 (Thu, 28 Mar 2024)
Changed paths:
A LayoutTests/svg/foreignObject/filter-repaint-expected.svg
A LayoutTests/svg/foreignObject/filter-repaint.svg
M Source/WebCore/rendering/svg/SVGResourcesCache.cpp
Log Message:
-----------
Invalidate SVG filter results in SVGResourcesCache::clientLayoutChanged()
https://bugs.webkit.org/show_bug.cgi?id=271449
Reviewed by Simon Fraser.
This patch is to align WebKit with Gecko / Firefox and Blink / Chromium.
Merge:
https://chromium.googlesource.com/chromium/blink/+/25d72ebd50bec9a4caa426e735e5ee7292c4da69
^ Also import `skipped` test from Blink / Chromium upstream.
This patch effectively fix regression introduced by 91851@main.
For the SVG tree, filter result invalidation is handled by
LegacyRenderSVGResource::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 91851@main 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.
* Source/WebCore/rendering/svg/SVGResourcesCache.cpp:
(SVGResourcesCache::clientLayoutChanged():
* LayoutTests/svg/foreignObject/filter-repaint.svg: Add Test Case
* LayoutTests/svg/foreignObject/filter-repaint-expected.svg: Add Test Case
Expectation
Canonical link: https://commits.webkit.org/276808@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes