[webkit-changes] [WebKit/WebKit] 9e8d4d: [CSS shape function] Implement rendering for the s...
Simon Fraser
noreply at github.com
Mon Aug 5 10:35:45 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 9e8d4d66bfae9fc1c30ba135fd982db050c95872
https://github.com/WebKit/WebKit/commit/9e8d4d66bfae9fc1c30ba135fd982db050c95872
Author: Simon Fraser <simon.fraser at apple.com>
Date: 2024-08-05 (Mon, 05 Aug 2024)
Changed paths:
M LayoutTests/TestExpectations
M LayoutTests/imported/w3c/web-platform-tests/css/css-masking/clip-path/clip-path-shape-003.html
M Source/WebCore/css/BasicShapeConversion.cpp
M Source/WebCore/rendering/style/BasicShapesShape.cpp
M Source/WebCore/rendering/style/BasicShapesShape.h
Log Message:
-----------
[CSS shape function] Implement rendering for the shape function
https://bugs.webkit.org/show_bug.cgi?id=277610
rdar://problem/133166445
Reviewed by Antti Koivisto.
Implement `BasicShapeShape::path()` so that we actually get a Path to use for clipping etc,
which makes the `shape()` function work in clip-path and other properties that use Basic Shapes.
Path building uses a SVGPathParser and SVGPathBuilder to leverage existing code that knows how
to generate a Path from an SVG path.
Tests revealed a bug: we need to make `windRule()` virtual to override the base class
which returns a hard-coded value.
Based on code by Noam Rosenthal.
Tested by tests in css/css-masking/clip-path which are now passing.
* LayoutTests/TestExpectations:
* LayoutTests/imported/w3c/web-platform-tests/css/css-masking/clip-path/clip-path-shape-003.html: Update from the `via` to `using` keyword.
* Source/WebCore/css/BasicShapeConversion.cpp:
(WebCore::basicShapePathForValue): Remove a log left in by mistake.
* Source/WebCore/rendering/style/BasicShapesShape.cpp:
(WebCore::BasicShapeShape::path const):
* Source/WebCore/rendering/style/BasicShapesShape.h:
Canonical link: https://commits.webkit.org/281837@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list