Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 5e5b9a5b875832422ab40ba53d59c25a916d8372
      
https://github.com/WebKit/WebKit/commit/5e5b9a5b875832422ab40ba53d59c25a916d8372
  Author: lilly <[email protected]>
  Date:   2026-06-18 (Thu, 18 Jun 2026)

  Changed paths:
    M Source/WebCore/rendering/BorderShape.cpp
    M Source/WebCore/rendering/BorderShape.h

  Log Message:
  -----------
  BorderShape: add corner-shape curvature support to BorderShape class interface
https://bugs.webkit.org/show_bug.cgi?id=317216
rdar://179838167

Reviewed by Simon Fraser.

Extends BorderShape with per-corner curvature support for CSS corner-shape.
Adds a new constructor taking curvatures defaulting to {1,1,1,1} so all 
existing call sites
are unaffected, and a cornerCurvaturesFromStyle helper pending the follow-up 
that wires up the style read. Adds private helpers
as stubs, all path, clip, and fill methods dispatch through them when any 
corner has a non-round curvature,
with the rounded-rect fast path preserved for the common case.

No behavioral change — hasNonRoundCornerShape() returns false and 
cornerCurvaturesFromStyle returns all-round until the follow-up implements them.

* Source/WebCore/rendering/BorderShape.cpp:
(WebCore::cornerCurvaturesFromStyle):
(WebCore::BorderShape::shapeForBorderRect):
(WebCore::BorderShape::shapeForOffsetRect):
(WebCore::BorderShape::BorderShape):
(WebCore::BorderShape::shapeWithBorderWidths const):
(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::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/315501@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to