Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 4894d8539f316ce6239325ff37bf5a93f31817cf
https://github.com/WebKit/WebKit/commit/4894d8539f316ce6239325ff37bf5a93f31817cf
Author: Anne van Kesteren <[email protected]>
Date: 2026-04-08 (Wed, 08 Apr 2026)
Changed paths:
A LayoutTests/fast/css/outline-border-radius-negative-offset-expected.html
A LayoutTests/fast/css/outline-border-radius-negative-offset.html
M Source/WebCore/rendering/BackgroundPainter.cpp
M Source/WebCore/rendering/BorderShape.cpp
M Source/WebCore/rendering/BorderShape.h
M Source/WebCore/rendering/OutlinePainter.cpp
Log Message:
-----------
Fix radii for non-auto outline
https://bugs.webkit.org/show_bug.cgi?id=311627
Reviewed by Simon Fraser.
Non-auto outlines with negative outline-offset and border-radius kept
the full border-box radii instead of shrinking them inward. The root
cause was BorderShape::shapeForOutsetRect clamping per-side deltas to
zero, which meant inward offsets had no effect on radii.
Since radii.expand() already clamps each component to zero internally,
the fix is removing the std::max(..., 0) on the deltas. This also makes
shapeForInsetRect redundant — its only caller (BackgroundPainter for
negative box-shadow spread) now uses the unified method. Renamed to
shapeForOffsetRect and extracted shared helpers zeroRadiiForOpenEdges
and applyClosedEdges.
Test: fast/css/outline-border-radius-negative-offset.html
Canonical link: https://commits.webkit.org/310784@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications