Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6787a18c749f439c82a4b33e3679eec926351227
      
https://github.com/WebKit/WebKit/commit/6787a18c749f439c82a4b33e3679eec926351227
  Author: Simon Fraser <[email protected]>
  Date:   2026-09-04 (Fri, 04 Sep 2026)

  Changed paths:
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-borders/corner-shape/corner-shape-outside-left-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-borders/corner-shape/corner-shape-outside-left.html
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-borders/corner-shape/corner-shape-outside-right-expected.txt
    M Source/WebCore/platform/graphics/BezierUtilities.cpp
    M Source/WebCore/platform/graphics/BezierUtilities.h
    M Source/WebCore/platform/graphics/PathUtilities.cpp
    M Source/WebCore/platform/graphics/PathUtilities.h
    M Source/WebCore/rendering/BorderShape.cpp
    M Source/WebCore/rendering/BorderShape.h
    M Source/WebCore/rendering/shapes/BoxLayoutShape.cpp
    M Source/WebCore/rendering/shapes/BoxLayoutShape.h
    M Source/WebCore/rendering/shapes/LayoutShape.cpp
    M Source/WebCore/rendering/shapes/LayoutShape.h
    M Source/WebCore/rendering/shapes/PolygonLayoutShape.cpp
    M Source/WebCore/rendering/shapes/PolygonLayoutShape.h
    M Source/WebCore/rendering/shapes/ShapeOutsideInfo.cpp

  Log Message:
  -----------
  [corner-shape] `shape-outside` ignores corner-shape for <shape-box> values
https://bugs.webkit.org/show_bug.cgi?id=322358
rdar://185643661

Reviewed by Simon Fraser.

Take `corner-shape` into account for `shape-outside`. 
`computeGeometryForBoxShape()` now computes
a polygon for the inner or outer shape via new functions in PathUtilities, 
which produce a polygon by fetching
the path and sampling it to create a vector of points. This polygon feeds into 
the existing shape-outside
code.

Based on work by Lilly Le (@cupidsity), with a fix for the positioning of the 
contour for
`shape-outside: padding-box`.

* 
LayoutTests/imported/w3c/web-platform-tests/css/css-borders/corner-shape/corner-shape-outside-left-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-borders/corner-shape/corner-shape-outside-left.html:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-borders/corner-shape/corner-shape-outside-right-expected.txt:
* Source/WebCore/platform/graphics/BezierUtilities.cpp:
(WebCore::appendFlattenedBezier): A helper that appends points to the vector 
for a bezier segment.
* Source/WebCore/platform/graphics/BezierUtilities.h:
* Source/WebCore/rendering/BorderShape.cpp:
(WebCore::BorderShape::constrainedRadiiScale):
(WebCore::flattenClosedPathToPolygon):
(WebCore::BorderShape::outerShapeAsPolygon const):
(WebCore::BorderShape::innerShapeAsPolygon const):
(WebCore::BorderShape::offsetReferenceRect const):
(WebCore::constrainedRadiiScale): Deleted.
* Source/WebCore/rendering/BorderShape.h:
* Source/WebCore/rendering/shapes/BoxLayoutShape.cpp:
(WebCore::BoxShapeGeometry::roundedRect const):
(WebCore::BoxShapeGeometry::contour const):
(WebCore::computeGeometryForBoxShape):
(WebCore::computeRoundedRectForBoxShape):
(WebCore::BoxLayoutShape::getExcludedInterval const):
* Source/WebCore/rendering/shapes/BoxLayoutShape.h:
* Source/WebCore/rendering/shapes/LayoutShape.cpp:
(WebCore::LayoutShape::createBoxShape):
* Source/WebCore/rendering/shapes/LayoutShape.h:
* Source/WebCore/rendering/shapes/PolygonLayoutShape.cpp:
(WebCore::inwardEdgeNormal):
(WebCore::uniteEdgeExcludedInterval):
(WebCore::PolygonLayoutShape::getExcludedInterval const):
(WebCore::outwardEdgeNormal): Deleted.
* Source/WebCore/rendering/shapes/PolygonLayoutShape.h:
* Source/WebCore/rendering/shapes/ShapeOutsideInfo.cpp:
(WebCore::makeShapeForShapeOutside):
* Source/WebCore/platform/graphics/PathUtilities.cpp:
(WebCore::PathUtilities::flattenPath):
(WebCore::PathUtilities::flattenPathToContour):
* Source/WebCore/platform/graphics/PathUtilities.h:

Canonical link: https://commits.webkit.org/320552@main



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

Reply via email to