Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: f0f0f788dff03626596509029957a1fd63411667
https://github.com/WebKit/WebKit/commit/f0f0f788dff03626596509029957a1fd63411667
Author: lilly <[email protected]>
Date: 2026-07-30 (Thu, 30 Jul 2026)
Changed paths:
M Source/WebCore/platform/graphics/BezierUtilities.cpp
M Source/WebCore/platform/graphics/BezierUtilities.h
M Source/WebCore/platform/graphics/CornerShapeUtilities.cpp
M Source/WebCore/platform/graphics/CornerShapeUtilities.h
M Source/WebCore/rendering/BorderShape.cpp
M Source/WebCore/rendering/BorderShape.h
M Source/WebCore/rendering/OutlinePainter.cpp
Log Message:
-----------
corner-shape: corners are mis-positioned/mis-shaped on outlines and
box-shadow spread
https://bugs.webkit.org/show_bug.cgi?id=320590
rdar://183564957
Reviewed by Simon Fraser.
Non-round corner-shape corners don't follow their geometry when a decoration
is offset from the border box, outlines (with outline-offset) and box-shadow
spread. Scaling the corner radii on the moved rect only works for corners that
meet their edges tangentially, so shapes that don't (or have no radius to
scale)come
out wrong across the board, not just the exact-shape corners.
Passes tests written in another commit
* Source/WebCore/platform/graphics/BezierUtilities.cpp:
(WebCore::pointOnBezierAtParameter):
(WebCore::resampleByArcLength):
(WebCore::hermiteInterpolate):
(WebCore::addCatmullRomBeziers):
* Source/WebCore/platform/graphics/BezierUtilities.h:
* Source/WebCore/platform/graphics/CornerShapeUtilities.cpp:
(WebCore::borderContourPath):
* Source/WebCore/platform/graphics/CornerShapeUtilities.h:
* Source/WebCore/rendering/BorderShape.cpp:
(WebCore::BorderShape::shapeForOffsetRect):
(WebCore::BorderShape::shapeWithBorderWidths const):
(WebCore::cornersHaveConvexSuperellipse):
(WebCore::cornersUseAlignedToCurveOffset):
(WebCore::addAlignedToCurveOffsetContour):
(WebCore::BorderShape::pathForOuterCornerShape const):
(WebCore::BorderShape::pathForInnerCornerShape const):
(WebCore::BorderShape::fillRectWithInnerHoleShape const):
* Source/WebCore/rendering/BorderShape.h:
(WebCore::BorderShape::shapeForOffsetRect):
* Source/WebCore/rendering/OutlinePainter.cpp:
(WebCore::OutlinePainter::paintOutline const):
(WebCore::OutlinePainter::paintFocusRing const):
Canonical link: https://commits.webkit.org/318287@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications