Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: de288df8b7d08c4ed4eea9d2021ab20df5164e6b
https://github.com/WebKit/WebKit/commit/de288df8b7d08c4ed4eea9d2021ab20df5164e6b
Author: lilly <[email protected]>
Date: 2026-06-24 (Wed, 24 Jun 2026)
Changed paths:
M Source/WebCore/rendering/BorderShape.cpp
M Source/WebCore/rendering/BorderShape.h
Log Message:
-----------
BorderShape: implement corner-shape dispatch and eliminate redundant pixel
snapping in path helpers
https://bugs.webkit.org/show_bug.cgi?id=317453
rdar://180074651
Reviewed by Simon Fraser.
This change implements both: cornerCurvaturesFromStyle now reads the
four curvature values from BorderData, and hasNonRoundCornerShape()
returns true when any corner has both a non-round curvature and a non-zero
radius — a zero-radius corner has no curve to shape so the check correctly
skips it. Also updates the private path-building helpers to take pre-computed
FloatRoundedRect parameters so each caller pixel-snaps once and passes
the result through, avoiding redundant snapping.
Passes existing tests
* Source/WebCore/rendering/BorderShape.cpp:
(WebCore::cornerCurvaturesFromStyle):
(WebCore::BorderShape::hasNonRoundCornerShape const):
(WebCore::BorderShape::pathForOuterRoundedRect const):
(WebCore::BorderShape::pathForInnerRoundedRect const):
(WebCore::BorderShape::pathForOuterCornerShape const):
(WebCore::BorderShape::pathForInnerCornerShape const):
(WebCore::BorderShape::pathForOuterShape const):
(WebCore::BorderShape::pathForInnerShape const):
(WebCore::BorderShape::addOuterShapeToPath const):
(WebCore::BorderShape::addInnerShapeToPath const):
(WebCore::BorderShape::pathForBorderArea const):
(WebCore::BorderShape::clipToOuterShape const):
(WebCore::BorderShape::clipToInnerShape const):
(WebCore::BorderShape::clipOutOuterShape const):
(WebCore::BorderShape::clipOutInnerShape const):
(WebCore::BorderShape::fillOuterShape const):
(WebCore::BorderShape::fillInnerShape const):
(WebCore::BorderShape::fillRectWithInnerHoleShape const):
* Source/WebCore/rendering/BorderShape.h:
Canonical link: https://commits.webkit.org/315750@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications