Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 615d0d245f473fb9fcf6db8ec087bfe7f7626a04
https://github.com/WebKit/WebKit/commit/615d0d245f473fb9fcf6db8ec087bfe7f7626a04
Author: lilly <[email protected]>
Date: 2026-07-29 (Wed, 29 Jul 2026)
Changed paths:
M Source/WebCore/rendering/BackgroundPainter.cpp
M Source/WebCore/rendering/BorderPainter.cpp
M Source/WebCore/rendering/BorderShape.cpp
M Source/WebCore/rendering/BorderShape.h
Log Message:
-----------
corner-shape: bevel/notch/square corners are mis-positioned on outlines and
box-shadow spread
https://bugs.webkit.org/show_bug.cgi?id=320106
rdar://183043471
Reviewed by Simon Fraser.
Record the border-box rounded rect on the offset BorderShape (new
alignCornersToCurve flag on shapeForOffsetRect). When building an
outline or box-shadow contour, regenerate just the exact-shape corners
(bevel/notch/square) directly from that reference, offset out/in to
the contour rect, rather than scaling their corner
box(rebuildOffsetCornersFromReference).
New tests will be written in a seperate commit for WPT
* Source/WebCore/rendering/BackgroundPainter.cpp:
(WebCore::BackgroundPainter::paintBoxShadow const):
* Source/WebCore/rendering/BorderPainter.cpp:
(WebCore::BorderPainter::paintBorderSides const):
* Source/WebCore/rendering/BorderShape.cpp:
(WebCore::BorderShape::shapeForOffsetRect):
(WebCore::BorderShape::shapeWithBorderWidths const):
(WebCore::BorderShape::move):
(WebCore::rebuildOffsetCornersFromReference):
(WebCore::addOuterCornerShapeToPath):
(WebCore::BorderShape::pathForOuterCornerShape const):
(WebCore::addInnerCornerShapeToPath):
(WebCore::BorderShape::pathForInnerCornerShape const):
(WebCore::BorderShape::pathForOuterShape const):
(WebCore::BorderShape::pathForInnerShape const):
(WebCore::BorderShape::addOuterShapeToPath const):
(WebCore::BorderShape::addInnerShapeToPath 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::snapOffsetReference):
(WebCore::BorderShape::snappedOffsetReferenceRect const):
* Source/WebCore/rendering/BorderShape.h:
(WebCore::BorderShape::shapeForOffsetRect):
Canonical link: https://commits.webkit.org/318193@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications