Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 4f7f297bd72c384b62959578b03b62182ef4a130
https://github.com/WebKit/WebKit/commit/4f7f297bd72c384b62959578b03b62182ef4a130
Author: Nikolas Zimmermann <[email protected]>
Date: 2026-07-13 (Mon, 13 Jul 2026)
Changed paths:
M Source/WebCore/rendering/RenderLayer.h
M Source/WebCore/rendering/RenderLayerSVGAdditions.cpp
Log Message:
-----------
[LBSE] Clip the SVG child-paint loop once per container instead of once per
shape
https://bugs.webkit.org/show_bug.cgi?id=319203
Reviewed by Rob Buis.
When painting SVG, paintChildrenInDOMOrderForSVG() set up a clip rectangle
for every child shape before drawing it. Each shape did its own save, clip,
and restore, even though the clip rectangle was the same for all of them.
When there is only one region to clip to and no child draws on its own
layer, we now set that clip up a single time and let every child share it.
Both transformed and non-transformed children use the shared clip, so the
extra per-shape save and clip are gone.
Covered by existing tests under LBSE.
* Source/WebCore/rendering/RenderLayer.h:
* Source/WebCore/rendering/RenderLayerSVGAdditions.cpp:
(WebCore::RenderLayer::paintNonLayerChildForFragmentsForSVG):
(WebCore::RenderLayer::paintChildrenInDOMOrderForSVG):
Canonical link: https://commits.webkit.org/317036@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications