Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 6b58d86abe7e23bfd3ce6bdedf85825c7c2391fa
https://github.com/WebKit/WebKit/commit/6b58d86abe7e23bfd3ce6bdedf85825c7c2391fa
Author: Simon Fraser <[email protected]>
Date: 2026-09-13 (Sun, 13 Sep 2026)
Changed paths:
M LayoutTests/TestExpectations
M
LayoutTests/imported/w3c/web-platform-tests/css/css-shapes/animation/shape-outside-path-interpolation-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/css/css-shapes/animation/shape-outside-shape-interpolation-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/css/css-shapes/parsing/shape-outside-computed-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/css/css-shapes/parsing/shape-outside-path-valid-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/css/css-shapes/parsing/shape-outside-shape-valid-expected.txt
A
LayoutTests/imported/w3c/web-platform-tests/css/css-shapes/shape-outside-shape-function-expected.txt
A
LayoutTests/imported/w3c/web-platform-tests/css/css-shapes/shape-outside-shape-function.html
M Source/WebCore/Headers.cmake
M Source/WebCore/Sources.txt
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
M Source/WebCore/css/parser/CSSPropertyParserConsumer+Shapes.cpp
M Source/WebCore/rendering/shapes/LayoutShape.cpp
M Source/WebCore/rendering/shapes/LayoutShape.h
A Source/WebCore/rendering/shapes/PathLayoutShape.cpp
A Source/WebCore/rendering/shapes/PathLayoutShape.h
M Source/WebCore/rendering/shapes/ShapeOutsideInfo.cpp
M Source/WebCore/style/values/shapes/StyleShapeOutside.cpp
Log Message:
-----------
shape-outside should support path() and shape() functions
https://bugs.webkit.org/show_bug.cgi?id=201905
rdar://93178320
Reviewed by Tim Nguyen.
Support `path()` and `shape()` functions in `shape-outside`. This is now easy
after 320552@main,
which made `shape-outside` respect `corner-shape` by building a polygon to
approximate the
path. We can then feed that polygon into the existing exclusion logic.
`LayoutShape::createShape()` now returns a `PathLayoutShape` which contains the
flattened
path, and `PathLayoutShape` implements `getExcludedInterval()`.
Based on work by Lilly Le (@cupidsity).
Test:
imported/w3c/web-platform-tests/css/css-shapes/shape-outside-shape-function.html
* LayoutTests/TestExpectations:
*
LayoutTests/imported/w3c/web-platform-tests/css/css-shapes/animation/shape-outside-path-interpolation-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/css/css-shapes/animation/shape-outside-shape-interpolation-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/css/css-shapes/parsing/shape-outside-computed-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/css/css-shapes/parsing/shape-outside-path-valid-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/css/css-shapes/parsing/shape-outside-shape-valid-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/css/css-shapes/shape-outside-shape-function-expected.txt:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-shapes/shape-outside-shape-function.html:
Added.
* Source/WebCore/Headers.cmake:
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/css/parser/CSSPropertyParserConsumer+Shapes.cpp:
(WebCore::CSSPropertyParserHelpers::consumeShapeOutside):
* Source/WebCore/rendering/shapes/LayoutShape.cpp:
(WebCore::createPathShape):
(WebCore::LayoutShape::createShape):
* Source/WebCore/rendering/shapes/LayoutShape.h:
* Source/WebCore/rendering/shapes/PathLayoutShape.cpp: Added.
(WebCore::PathLayoutShape::shapeMarginLogicalBoundingBox const):
(WebCore::PathLayoutShape::getExcludedInterval const):
(WebCore::PathLayoutShape::buildDisplayPaths const):
* Source/WebCore/rendering/shapes/PathLayoutShape.h: Added.
* Source/WebCore/rendering/shapes/ShapeOutsideInfo.cpp:
(WebCore::makeShapeForShapeOutside):
* Source/WebCore/style/values/shapes/StyleShapeOutside.cpp:
(WebCore::Style::CSSValueConversion<ShapeOutside>::operator):
Canonical link: https://commits.webkit.org/321010@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications