[webkit-changes] [WebKit/WebKit] 6dd9b4: [css-shapes] Implement xywh() shape

Nikos Mouchtaris noreply at github.com
Fri Sep 8 07:22:20 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6dd9b4ce08d7fc1933952dfd57de080a21882127
      https://github.com/WebKit/WebKit/commit/6dd9b4ce08d7fc1933952dfd57de080a21882127
  Author: Nikolaos Mouchtaris <nmouchtaris at apple.com>
  Date:   2023-09-08 (Fri, 08 Sep 2023)

  Changed paths:
    M LayoutTests/TestExpectations
    M LayoutTests/imported/w3c/web-platform-tests/css/css-masking/animations/clip-path-interpolation-xywh-rect-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-masking/parsing/clip-path-computed-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-masking/parsing/clip-path-valid-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/motion/animation/offset-path-interpolation-006-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/motion/parsing/offset-path-computed-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/motion/parsing/offset-path-parsing-valid-expected.txt
    M Source/WebCore/css/BasicShapeFunctions.cpp
    M Source/WebCore/css/CSSBasicShapes.cpp
    M Source/WebCore/css/CSSBasicShapes.h
    M Source/WebCore/css/CSSValue.cpp
    M Source/WebCore/css/CSSValue.h
    M Source/WebCore/css/CSSValueKeywords.in
    M Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp
    M Source/WebCore/rendering/style/BasicShapes.cpp
    M Source/WebCore/rendering/style/BasicShapes.h

  Log Message:
  -----------
  [css-shapes] Implement xywh() shape
https://bugs.webkit.org/show_bug.cgi?id=259989
rdar://113643020

Reviewed by Tim Nguyen.

Implement parsing of xywh() shape and create xywh
subclass for BasicShape and CSSValue.

Translating to inset() for the computed style & animations is unimplemented.

Spec: https://drafts.csswg.org/css-shapes-1/#funcdef-basic-shape-xywh

* LayoutTests/TestExpectations:
* LayoutTests/imported/w3c/web-platform-tests/css/css-masking/animations/clip-path-interpolation-xywh-rect-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-masking/parsing/clip-path-computed-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-masking/parsing/clip-path-valid-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/motion/animation/offset-path-interpolation-006-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/motion/parsing/offset-path-computed-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/motion/parsing/offset-path-parsing-valid-expected.txt:
* Source/WebCore/css/BasicShapeFunctions.cpp:
(WebCore::valueForBasicShape):
(WebCore::basicShapeForValue):
* Source/WebCore/css/CSSBasicShapes.cpp:
(WebCore::CSSXywhValue::CSSXywhValue):
(WebCore::CSSXywhValue::create):
(WebCore::CSSXywhValue::equals const):
(WebCore::updateCornerRadiusWidthAndHeight):
(WebCore::buildRadii):
(WebCore::buildXywhString):
(WebCore::CSSXywhValue::customCSSText const):
(WebCore::buildInsetString):
(WebCore::buildInsetRadii): Deleted.
* Source/WebCore/css/CSSBasicShapes.h:
(WebCore::CSSXywhValue::insetX const):
(WebCore::CSSXywhValue::insetY const):
(WebCore::CSSXywhValue::width const):
(WebCore::CSSXywhValue::height const):
(WebCore::CSSXywhValue::topLeftRadius const):
(WebCore::CSSXywhValue::topRightRadius const):
(WebCore::CSSXywhValue::bottomRightRadius const):
(WebCore::CSSXywhValue::bottomLeftRadius const):
* Source/WebCore/css/CSSValue.cpp:
(WebCore::CSSValue::visitDerived):
* Source/WebCore/css/CSSValue.h:
(WebCore::CSSValue::isXywhShape const):
* Source/WebCore/css/CSSValueKeywords.in:
* Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp:
(WebCore::CSSPropertyParserHelpers::consumeShapeBorderRadius):
(WebCore::CSSPropertyParserHelpers::consumeBasicShapeXywh):
(WebCore::CSSPropertyParserHelpers::consumeBasicShapeInset):
(WebCore::CSSPropertyParserHelpers::consumeBasicShape):
* Source/WebCore/rendering/style/BasicShapes.cpp:
(WebCore::BasicShapeXywh::create):
(WebCore::BasicShapeXywh::BasicShapeXywh):
(WebCore::BasicShapeXywh::clone const):
(WebCore::BasicShapeXywh::operator== const):
(WebCore::BasicShapeXywh::path):
(WebCore::BasicShapeXywh::canBlend const):
(WebCore::BasicShapeXywh::blend const):
(WebCore::BasicShapeXywh::dump const):
* Source/WebCore/rendering/style/BasicShapes.h:

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




More information about the webkit-changes mailing list