Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: d3095f5cfe71aed87cd8fa46d122024fc6e9ad69
https://github.com/WebKit/WebKit/commit/d3095f5cfe71aed87cd8fa46d122024fc6e9ad69
Author: lilly <[email protected]>
Date: 2026-07-09 (Thu, 09 Jul 2026)
Changed paths:
M Source/WebCore/platform/graphics/CornerShapeUtilities.cpp
M Source/WebCore/platform/graphics/GeometryUtilities.cpp
M Source/WebCore/platform/graphics/GeometryUtilities.h
Log Message:
-----------
corner-shape: Implement scoop and round corner shapes in CornerShapeUtilities
https://bugs.webkit.org/show_bug.cgi?id=318922
rdar://181754123
Reviewed by Simon Fraser.
borderContourPath() only handled bevel and notch; other corner-shape values
fall through to a sharp mitered vertex. This implements the two circular
cases: round (superellipse(1)), an elliptical arc between the edge
tangent points, centered on the corner's center of curvature. scoop
(superellipse(-1)), the concave inverse, rendered by inverting the
corner (swap outer/center, negate curvature) to reuse the round arc code,
centered on the box's outer vertex. Border insets are handled per shape:
round radii shrink by the border width, scoop radii grow by it (a scoop's
border bites deeper), with arc endpoints computed where the ellipse crosses
the inset edges.
Passes tests written in another commit
* Source/WebCore/platform/graphics/CornerShapeUtilities.cpp:
* Source/WebCore/platform/graphics/GeometryUtilities.cpp:
(WebCore::eccentricAngle):
* Source/WebCore/platform/graphics/GeometryUtilities.h:
Canonical link: https://commits.webkit.org/316816@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications