Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 8ddcdb6f831a833b2e2faa9a13e3c42642ed6502
https://github.com/WebKit/WebKit/commit/8ddcdb6f831a833b2e2faa9a13e3c42642ed6502
Author: Taher Ali <[email protected]>
Date: 2026-02-11 (Wed, 11 Feb 2026)
Changed paths:
M
LayoutTests/platform/glib/svg/repaint/repaint-non-scaling-stroke-text-decoration-expected.txt
M
LayoutTests/platform/glib/svg/repaint/repaint-non-scaling-stroke-text-expected.txt
M
LayoutTests/platform/ios/svg/repaint/repaint-non-scaling-stroke-text-decoration-expected.txt
M
LayoutTests/platform/ios/svg/repaint/repaint-non-scaling-stroke-text-expected.txt
M LayoutTests/svg/custom/non-scaling-stroke-expected.txt
A
LayoutTests/svg/repaint/non-scaling-stroke-transform-animation-expected.html
A LayoutTests/svg/repaint/non-scaling-stroke-transform-animation.html
M
LayoutTests/svg/repaint/repaint-non-scaling-stroke-text-decoration-expected.txt
M LayoutTests/svg/repaint/repaint-non-scaling-stroke-text-expected.txt
M Source/WebCore/rendering/svg/SVGRenderSupport.cpp
M Source/WebCore/rendering/svg/SVGRenderSupport.h
M Source/WebCore/rendering/svg/legacy/LegacyRenderSVGContainer.cpp
M Source/WebCore/rendering/svg/legacy/LegacyRenderSVGContainer.h
M Source/WebCore/rendering/svg/legacy/LegacyRenderSVGModelObject.cpp
M Source/WebCore/rendering/svg/legacy/LegacyRenderSVGModelObject.h
M Source/WebCore/rendering/svg/legacy/LegacyRenderSVGRoot.cpp
M Source/WebCore/rendering/svg/legacy/LegacyRenderSVGRoot.h
M Source/WebCore/rendering/svg/legacy/LegacyRenderSVGShape.cpp
Log Message:
-----------
Fix repaint artifacts for non-scaling-stroke with animated transforms
https://bugs.webkit.org/show_bug.cgi?id=278231
rdar://134313456
Reviewed by Simon Fraser.
When an SVG element has vector-effect: non-scaling-stroke and its ancestor
transform is animated, the legacy SVG engine leaves visual artifacts from
previous frames. This is because the stroke bounding box depends on the
screen CTM, but the repaint bounding boxes were cached and not recomputed
when ancestor transforms changed.
The fix requires bypassing caching at two levels: Shape level, and Container
level
Both fixes are required: the container fix ensures children are queried,
and the shape fix ensures children return correct (non-cached) answers.
*
LayoutTests/platform/glib/svg/repaint/repaint-non-scaling-stroke-text-decoration-expected.txt:
*
LayoutTests/platform/glib/svg/repaint/repaint-non-scaling-stroke-text-expected.txt:
*
LayoutTests/platform/ios/svg/repaint/repaint-non-scaling-stroke-text-decoration-expected.txt:
*
LayoutTests/platform/ios/svg/repaint/repaint-non-scaling-stroke-text-expected.txt:
* LayoutTests/svg/custom/non-scaling-stroke-expected.txt:
* LayoutTests/svg/repaint/non-scaling-stroke-transform-animation-expected.html:
Added.
* LayoutTests/svg/repaint/non-scaling-stroke-transform-animation.html: Added.
*
LayoutTests/svg/repaint/repaint-non-scaling-stroke-text-decoration-expected.txt:
* LayoutTests/svg/repaint/repaint-non-scaling-stroke-text-expected.txt:
The bounding boxes are getting slightly tigther because
it's computing more accurate bounds for non-scaling-stroke cases.
* LayoutTests/svg/repaint/non-scaling-stroke-transform-animation-expected.html:
Added.
* LayoutTests/svg/repaint/non-scaling-stroke-transform-animation.html: Added.
*
LayoutTests/svg/repaint/repaint-non-scaling-stroke-text-decoration-expected.txt:
* LayoutTests/svg/repaint/repaint-non-scaling-stroke-text-expected.txt:
* Source/WebCore/rendering/svg/SVGRenderSupport.cpp:
(WebCore::SVGRenderSupport::styleChanged):
(WebCore::SVGRenderSupport::updateAncestorNonScalingStrokeCounts):
(WebCore::SVGRenderSupport::elementInsertedIntoTree):
(WebCore::SVGRenderSupport::elementWillBeRemovedFromTree):
* Source/WebCore/rendering/svg/SVGRenderSupport.h:
* Source/WebCore/rendering/svg/legacy/LegacyRenderSVGContainer.cpp:
(WebCore::LegacyRenderSVGContainer::repaintRectInLocalCoordinates const):
* Source/WebCore/rendering/svg/legacy/LegacyRenderSVGContainer.h:
(WebCore::LegacyRenderSVGContainer::hasNonScalingStrokeDescendant const):
(WebCore::LegacyRenderSVGContainer::adjustNonScalingStrokeDescendantCount):
* Source/WebCore/rendering/svg/legacy/LegacyRenderSVGModelObject.cpp:
(WebCore::LegacyRenderSVGModelObject::willBeDestroyed):
(WebCore::LegacyRenderSVGModelObject::insertedIntoTree):
* Source/WebCore/rendering/svg/legacy/LegacyRenderSVGModelObject.h:
* Source/WebCore/rendering/svg/legacy/LegacyRenderSVGRoot.cpp:
(WebCore::LegacyRenderSVGRoot::repaintRectInLocalCoordinates const):
* Source/WebCore/rendering/svg/legacy/LegacyRenderSVGRoot.h:
* Source/WebCore/rendering/svg/legacy/LegacyRenderSVGShape.cpp:
(WebCore::LegacyRenderSVGShape::repaintRectInLocalCoordinates const):
Canonical link: https://commits.webkit.org/307282@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications