Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 93c8445d72b55b01002030e544e3f935e0d9873b
https://github.com/WebKit/WebKit/commit/93c8445d72b55b01002030e544e3f935e0d9873b
Author: Nikolas Zimmermann <[email protected]>
Date: 2026-05-19 (Tue, 19 May 2026)
Changed paths:
M Source/WebCore/rendering/svg/RenderSVGRect.cpp
M Source/WebCore/rendering/svg/RenderSVGResourceClipper.cpp
M Source/WebCore/rendering/svg/RenderSVGShape.h
Log Message:
-----------
[LBSE] Skip redundant clipToRect in RenderSVGRect::fillShape when clip-path
bounds drawing
https://bugs.webkit.org/show_bug.cgi?id=315093
Reviewed by Rob Buis.
Port https://commits.webkit.org/281361@main ("Avoid an extra clip when
painting a rect with a clip-path") to LBSE.
RenderSVGShape gains an m_fillRequiresClip bit (default true) with
fillRequiresClip()/setFillRequiresClip() accessors. In
RenderSVGResourceClipper::applyPathClipping, the same containment check
used by LegacyRenderSVGResourceClipper::applyResource flips the bit to
false when the clip-path's bounds lie inside objectBoundingBox.
RenderSVGRect::fillShape then reads the bit and resets it to true,
matching legacy's reset-after-fillStrokeMarkers pattern.
Improves MotionMark/Suits score by ~10%.
Covered by existing tests.
* Source/WebCore/rendering/svg/RenderSVGRect.cpp:
(WebCore::RenderSVGRect::fillShape const):
* Source/WebCore/rendering/svg/RenderSVGResourceClipper.cpp:
(WebCore::RenderSVGResourceClipper::applyPathClipping):
* Source/WebCore/rendering/svg/RenderSVGShape.h:
(WebCore::RenderSVGShape::fillRequiresClip const):
(WebCore::RenderSVGShape::setFillRequiresClip const):
Canonical link: https://commits.webkit.org/313491@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications