Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 9dcbefa2d5340d0df0395a643a18685eabfc8284
https://github.com/WebKit/WebKit/commit/9dcbefa2d5340d0df0395a643a18685eabfc8284
Author: Nikolas Zimmermann <[email protected]>
Date: 2026-10-09 (Fri, 09 Oct 2026)
Changed paths:
M Source/WebCore/SaferCPPExpectations/UncheckedCallArgsCheckerExpectations
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
M Source/WebCore/rendering/RenderLayerModelObject.cpp
M Source/WebCore/rendering/RenderLayerModelObject.h
M Source/WebCore/rendering/svg/RenderSVGContainer.cpp
M Source/WebCore/rendering/svg/RenderSVGRoot.cpp
R Source/WebCore/rendering/svg/SVGLayerTransformUpdater.h
A Source/WebCore/rendering/svg/SVGTransformLayoutScope.h
Log Message:
-----------
[LBSE] Stop updating the transform twice per layout of a container without a
layer
https://bugs.webkit.org/show_bug.cgi?id=326329
Reviewed by Rob Buis.
SVGLayerTransformUpdater recomputes the transform after layout when the
transform reference box moved, but it only remembered the box for renderers
with a layer. Without a layer, it compared against an empty rect and computed
the transform a second time on nearly every layout.
Also remember the box for renderers without a layer when transform-box is
view-box (the default), as an optimization. The other transform-box values
depend on the subtree layout, so without a layer the destructor always redoes
the update after the children are laid out.
While I was at it: rename the class to SVGTransformLayoutScope, since it
better matches the existing terminology we use in LBSE, e.g.
TransformPaintScope. Hold the renderer in a CheckedRef instead of a WeakRef,
like LayoutRepainter does, so the header no longer needs a safer C++
expectation -- no need to go thread the WeakRef machinery here.
Covered by existing tests.
* Source/WebCore/SaferCPPExpectations/UncheckedCallArgsCheckerExpectations:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/rendering/RenderLayerModelObject.cpp:
(WebCore::RenderLayerModelObject::transformReferenceBoxIsSVGViewport const):
* Source/WebCore/rendering/RenderLayerModelObject.h:
* Source/WebCore/rendering/svg/RenderSVGContainer.cpp:
(WebCore::RenderSVGContainer::layout):
* Source/WebCore/rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::layout):
* Source/WebCore/rendering/svg/SVGTransformLayoutScope.h: Renamed from
Source/WebCore/rendering/svg/SVGLayerTransformUpdater.h.
(WebCore::SVGTransformLayoutScope::SVGTransformLayoutScope):
(WebCore::SVGTransformLayoutScope::~SVGTransformLayoutScope):
Canonical link: https://commits.webkit.org/323223@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications