Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Invalidate SVG filter results in SVGResourcesCache::clientLayoutChang…
…ed() 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
- Loading branch information