Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: daaddb2470406dd65ba77d155c03b0e6eb60c047
      
https://github.com/WebKit/WebKit/commit/daaddb2470406dd65ba77d155c03b0e6eb60c047
  Author: Darin Adler <da...@apple.com>
  Date:   2023-12-08 (Fri, 08 Dec 2023)

  Changed paths:
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-masking/parsing/clip-path-invalid-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/css/motion/parsing/offset-path-parsing-invalid-expected.txt
    M Source/WebCore/css/CSSProperties.json
    M Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp
    M Source/WebCore/css/parser/CSSPropertyParserHelpers.h

  Log Message:
  -----------
  Reject empty path string when parsing offset-path and clip-path
https://bugs.webkit.org/show_bug.cgi?id=265666
rdar://119034794

Reviewed by Tim Nguyen.

Reject empty paths. Reject fill rules for offset-path.

This is what the WPT tests expect, although I can't find any specification that 
clearly
asks for either of these behaviors. It's expedient for now to match the tests 
and the
other browsers, although it would be better if the specification matched.

* 
LayoutTests/imported/w3c/web-platform-tests/css/css-masking/parsing/clip-path-invalid-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/motion/parsing/offset-path-parsing-invalid-expected.txt:
Expect more PASS.

* Source/WebCore/css/CSSProperties.json: Changed parameters for 
consumePathOperation
from ConsumeRay::Exclude/Include to RejectRay and RejectFillRule.

* Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp:
(WebCore::CSSPropertyParserHelpers::consumeBasicShapePath): Added support for
RejectFillRule. Reject empty paths.
(WebCore::CSSPropertyParserHelpers::consumeBasicShape): Added options passed
through to consumeBasicShapePath.
(WebCore::CSSPropertyParserHelpers::consumeBasicShapeRayOrBox): Take options
instead of the consumeRay argument. Pass the options through to 
consumeBasicShape,
and implement the RejectRay option.
(WebCore::CSSPropertyParserHelpers::consumePathOperation): Take options instead
of the consumeRay argument.
(WebCore::CSSPropertyParserHelpers::consumeShapeOutside): Pass options to 
consumeBasicShape.

* Source/WebCore/css/parser/CSSPropertyParserHelpers.h: Added 
PathParsingOption, removed
PathParsingOption. Made consumePathOperation take options instead of the 
consumeRay argument.

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


_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to