Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 6b3f8e7997e61e1eee03e51ec3d3b9e145efe57a
https://github.com/WebKit/WebKit/commit/6b3f8e7997e61e1eee03e51ec3d3b9e145efe57a
Author: Nikolas Zimmermann <[email protected]>
Date: 2026-08-18 (Tue, 18 Aug 2026)
Changed paths:
M LayoutTests/platform/mac-tahoe-wk2-lbse-text/TestExpectations
M
LayoutTests/platform/mac-tahoe-wk2-lbse-text/svg/W3C-SVG-1.1/filters-composite-02-b-expected.txt
M
LayoutTests/platform/mac-tahoe-wk2-lbse-text/svg/filters/feImage-filterUnits-objectBoundingBox-primitiveUnits-objectBoundingBox-expected.txt
M
LayoutTests/platform/mac-tahoe-wk2-lbse-text/svg/filters/feImage-filterUnits-objectBoundingBox-primitiveUnits-userSpaceOnUse-expected.png
M
LayoutTests/platform/mac-tahoe-wk2-lbse-text/svg/filters/feImage-filterUnits-objectBoundingBox-primitiveUnits-userSpaceOnUse-expected.txt
M
LayoutTests/platform/mac-tahoe-wk2-lbse-text/svg/filters/feImage-filterUnits-userSpaceOnUse-primitiveUnits-objectBoundingBox-expected.txt
M
LayoutTests/platform/mac-tahoe-wk2-lbse-text/svg/filters/feImage-filterUnits-userSpaceOnUse-primitiveUnits-userSpaceOnUse-expected.txt
M
LayoutTests/platform/mac-tahoe-wk2-lbse-text/svg/filters/feImage-late-indirect-update-expected.txt
M
LayoutTests/platform/mac-tahoe-wk2-lbse-text/svg/filters/feImage-multiple-targets-id-change-expected.txt
M
LayoutTests/platform/mac-tahoe-wk2-lbse-text/svg/filters/feImage-position-expected.txt
M
LayoutTests/platform/mac-tahoe-wk2-lbse-text/svg/filters/feImage-reference-invalidation-expected.txt
M
LayoutTests/platform/mac-tahoe-wk2-lbse-text/svg/filters/feImage-reference-svg-primitive-expected.txt
M
LayoutTests/platform/mac-tahoe-wk2-lbse-text/svg/filters/feImage-subregions-expected.txt
M
LayoutTests/platform/mac-tahoe-wk2-lbse-text/svg/filters/feImage-subregions-preseveAspectRatio-none-expected.txt
M
LayoutTests/platform/mac-tahoe-wk2-lbse-text/svg/filters/feImage-subregions-preseveAspectRatio-none-with-viewBox-expected.txt
M
LayoutTests/platform/mac-tahoe-wk2-lbse-text/svg/filters/feImage-target-add-to-document-expected.txt
M
LayoutTests/platform/mac-tahoe-wk2-lbse-text/svg/filters/feImage-target-attribute-change-expected.txt
M
LayoutTests/platform/mac-tahoe-wk2-lbse-text/svg/filters/feImage-target-changes-id-expected.txt
M
LayoutTests/platform/mac-tahoe-wk2-lbse-text/svg/filters/feImage-target-id-change-expected.txt
M
LayoutTests/platform/mac-tahoe-wk2-lbse-text/svg/filters/feImage-target-inline-style-change-expected.txt
M
LayoutTests/platform/mac-tahoe-wk2-lbse-text/svg/filters/feImage-target-property-change-expected.txt
M
LayoutTests/platform/mac-tahoe-wk2-lbse-text/svg/filters/feImage-target-reappend-to-document-expected.txt
M
LayoutTests/platform/mac-tahoe-wk2-lbse-text/svg/filters/feImage-target-remove-from-document-expected.txt
M
LayoutTests/platform/mac-tahoe-wk2-lbse-text/svg/filters/feImage-target-style-change-expected.txt
A
LayoutTests/svg/filters/feImage-target-with-layered-descendants-expected.svg
A LayoutTests/svg/filters/feImage-target-with-layered-descendants.svg
M Source/WebCore/rendering/RenderLayer.h
M Source/WebCore/rendering/RenderLayerModelObject.cpp
M Source/WebCore/rendering/RenderLayerSVGAdditions.cpp
M Source/WebCore/svg/SVGElement.cpp
M Source/WebCore/svg/SVGElement.h
M Source/WebCore/svg/SVGFEImageElement.cpp
Log Message:
-----------
[LBSE] Paint <feImage> referenced elements through the layer tree
https://bugs.webkit.org/show_bug.cgi?id=321677
Reviewed by Rob Buis.
SVGFEImageElement::imageBufferForEffect()
draws the referenced element with
SVGRenderingContext::renderSubtreeToContext(). That helper belongs to the legacy
SVG engine and LBSE must not use it: it calls RenderElement::paint() directly,
which skips every child that owns a RenderLayer, so any opacity, mask, filter or
3D transform below the referenced element was lost. Furthermore it uses
calculateTransformationToOutermostCoordinateSystem(), which does not see the
transforms kept on RenderLayers, most noticeable it misses the viewBox
transform of the outermost <svg> element.
Draw the element with RenderLayer::paintResourceLayerForSVG() instead, like
<mask>, <clipPath>, <pattern> and <marker> content, and ask
SVGTransformComputation for the buffer scale, fixing the problems.
The feImage-referenced element needs a layer for that, so
requiresLayerForSVGIntrinsicReasons() now assignes one to every element an
<feImage> points to.
Fixes several feImage-* tests under LBSE. Also add a new test that verifies
layered
descendants properly function under a feImage reference.
* LayoutTests/platform/mac-tahoe-wk2-lbse-text/TestExpectations:
*
LayoutTests/platform/mac-tahoe-wk2-lbse-text/svg/W3C-SVG-1.1/filters-composite-02-b-expected.txt:
*
LayoutTests/platform/mac-tahoe-wk2-lbse-text/svg/filters/feImage-filterUnits-objectBoundingBox-primitiveUnits-objectBoundingBox-expected.txt:
*
LayoutTests/platform/mac-tahoe-wk2-lbse-text/svg/filters/feImage-filterUnits-objectBoundingBox-primitiveUnits-userSpaceOnUse-expected.png:
*
LayoutTests/platform/mac-tahoe-wk2-lbse-text/svg/filters/feImage-filterUnits-objectBoundingBox-primitiveUnits-userSpaceOnUse-expected.txt:
*
LayoutTests/platform/mac-tahoe-wk2-lbse-text/svg/filters/feImage-filterUnits-userSpaceOnUse-primitiveUnits-objectBoundingBox-expected.txt:
*
LayoutTests/platform/mac-tahoe-wk2-lbse-text/svg/filters/feImage-filterUnits-userSpaceOnUse-primitiveUnits-userSpaceOnUse-expected.txt:
*
LayoutTests/platform/mac-tahoe-wk2-lbse-text/svg/filters/feImage-late-indirect-update-expected.txt:
*
LayoutTests/platform/mac-tahoe-wk2-lbse-text/svg/filters/feImage-multiple-targets-id-change-expected.txt:
*
LayoutTests/platform/mac-tahoe-wk2-lbse-text/svg/filters/feImage-position-expected.txt:
*
LayoutTests/platform/mac-tahoe-wk2-lbse-text/svg/filters/feImage-reference-invalidation-expected.txt:
*
LayoutTests/platform/mac-tahoe-wk2-lbse-text/svg/filters/feImage-reference-svg-primitive-expected.txt:
*
LayoutTests/platform/mac-tahoe-wk2-lbse-text/svg/filters/feImage-subregions-expected.txt:
*
LayoutTests/platform/mac-tahoe-wk2-lbse-text/svg/filters/feImage-subregions-preseveAspectRatio-none-expected.txt:
*
LayoutTests/platform/mac-tahoe-wk2-lbse-text/svg/filters/feImage-subregions-preseveAspectRatio-none-with-viewBox-expected.txt:
*
LayoutTests/platform/mac-tahoe-wk2-lbse-text/svg/filters/feImage-target-add-to-document-expected.txt:
*
LayoutTests/platform/mac-tahoe-wk2-lbse-text/svg/filters/feImage-target-attribute-change-expected.txt:
*
LayoutTests/platform/mac-tahoe-wk2-lbse-text/svg/filters/feImage-target-changes-id-expected.txt:
*
LayoutTests/platform/mac-tahoe-wk2-lbse-text/svg/filters/feImage-target-id-change-expected.txt:
*
LayoutTests/platform/mac-tahoe-wk2-lbse-text/svg/filters/feImage-target-inline-style-change-expected.txt:
*
LayoutTests/platform/mac-tahoe-wk2-lbse-text/svg/filters/feImage-target-property-change-expected.txt:
*
LayoutTests/platform/mac-tahoe-wk2-lbse-text/svg/filters/feImage-target-reappend-to-document-expected.txt:
*
LayoutTests/platform/mac-tahoe-wk2-lbse-text/svg/filters/feImage-target-remove-from-document-expected.txt:
*
LayoutTests/platform/mac-tahoe-wk2-lbse-text/svg/filters/feImage-target-style-change-expected.txt:
* LayoutTests/svg/filters/feImage-target-with-layered-descendants-expected.svg:
Added.
* LayoutTests/svg/filters/feImage-target-with-layered-descendants.svg:
Added.
* Source/WebCore/rendering/RenderLayer.h:
* Source/WebCore/rendering/RenderLayerModelObject.cpp:
(WebCore::RenderLayerModelObject::requiresLayerForSVGIntrinsicReasons const):
* Source/WebCore/rendering/RenderLayerSVGAdditions.cpp:
(WebCore::RenderLayer::paintChildrenInDOMOrderForSVG):
* Source/WebCore/svg/SVGElement.cpp:
(WebCore::SVGElement::addReferencingElement):
(WebCore::SVGElement::removeReferencingElement):
(WebCore::SVGElement::invalidateLayerRequirementForFEImageReference):
(WebCore::SVGElement::isReferencedByFEImage const):
* Source/WebCore/svg/SVGElement.h:
* Source/WebCore/svg/SVGFEImageElement.cpp:
(WebCore::SVGFEImageElement::notifyFinished):
(WebCore::SVGFEImageElement::imageBufferForEffect const):
Canonical link:
https://flagged.apple.com:443/proxy?t2=dk2H8q8KX3&o=aHR0cHM6Ly9jb21taXRzLndlYmtpdC5vcmcvMzE5Mzg4QG1haW4=&emid=2f7c8841-839d-43ef-8a59-b64236db8409&c=11
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications