[webkit-changes] [WebKit/WebKit] 598452: Split filter related css property parsing out into...

Commit Queue noreply at github.com
Sun Sep 1 09:18:02 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 5984529737faad47906ee14c18c1918f5f5e2f7c
      https://github.com/WebKit/WebKit/commit/5984529737faad47906ee14c18c1918f5f5e2f7c
  Author: Sam Weinig <sam at webkit.org>
  Date:   2024-09-01 (Sun, 01 Sep 2024)

  Changed paths:
    M LayoutTests/imported/w3c/web-platform-tests/css/filter-effects/parsing/filter-computed-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/filter-effects/parsing/filter-computed.html
    M LayoutTests/imported/w3c/web-platform-tests/css/filter-effects/parsing/filter-parsing-valid-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/filter-effects/parsing/filter-parsing-valid.html
    M Source/WebCore/Sources.txt
    M Source/WebCore/WebCore.xcodeproj/project.pbxproj
    A Source/WebCore/css/CSSFilterFunctionDescriptor.h
    M Source/WebCore/css/CSSFilterImageValue.cpp
    M Source/WebCore/css/CSSFontFeatureValue.cpp
    M Source/WebCore/css/CSSGradientValue.cpp
    M Source/WebCore/css/CSSPrimitiveValue.h
    M Source/WebCore/css/CSSProperties.json
    A Source/WebCore/css/parser/CSSPropertyParserConsumer+Filter.cpp
    A Source/WebCore/css/parser/CSSPropertyParserConsumer+Filter.h
    M Source/WebCore/css/parser/CSSPropertyParserConsumer+Font.cpp
    M Source/WebCore/css/parser/CSSPropertyParserConsumer+Image.cpp
    M Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp
    M Source/WebCore/css/parser/CSSPropertyParserHelpers.h
    R Source/WebCore/css/parser/CSSPropertyParserWorkerSafe.cpp
    R Source/WebCore/css/parser/CSSPropertyParserWorkerSafe.h
    M Source/WebCore/css/process-css-properties.py
    M Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp
    M Source/WebCore/style/FilterOperationsBuilder.cpp
    M Source/WebCore/style/FilterOperationsBuilder.h
    M Source/WebCore/style/StyleBuilderConverter.h
    M Source/WebCore/style/StyleBuilderState.cpp
    M Source/WebCore/style/StyleBuilderState.h

  Log Message:
  -----------
  Split filter related css property parsing out into its own file
https://bugs.webkit.org/show_bug.cgi?id=278975

Reviewed by Darin Adler.

Split filter related CSS property parsing into its own file, consolidating
parts from CSSPropertyParserHelpers.h/cpp and CSSPropertyParserWorkerSafe.h/cpp.

Took opportunity to clean up refactor parsing and filter operation building
to be easier to read by explicitly handling each filter type. To make things
less error prone, per-function details were abstracted into descriptors
allowing sharing code between the parser and building phases. Additionally,
the builder now follows the pattern of other CSS value conversion code and
asserts that the CSSValue is structured as expected, so it no longer needs
to return a std::optional or be conditionally converted.

Finally, two uses of eager calc() evaluation were removed, moving their
evaluation to the building phase as usual. This is the one change in
behavior, so parsing tests were added and updated.

* LayoutTests/imported/w3c/web-platform-tests/css/filter-effects/parsing/filter-computed-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/filter-effects/parsing/filter-computed.html:
* LayoutTests/imported/w3c/web-platform-tests/css/filter-effects/parsing/filter-parsing-valid-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/filter-effects/parsing/filter-parsing-valid.html:
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/css/CSSFilterFunctionDescriptor.h: Added.
* Source/WebCore/css/CSSFilterImageValue.cpp:
* Source/WebCore/css/CSSFontFeatureValue.cpp:
* Source/WebCore/css/CSSGradientValue.cpp:
* Source/WebCore/css/CSSPrimitiveValue.h:
* Source/WebCore/css/CSSProperties.json:
* Source/WebCore/css/parser/CSSPropertyParserConsumer+Filter.cpp: Added.
* Source/WebCore/css/parser/CSSPropertyParserConsumer+Filter.h: Added.
* Source/WebCore/css/parser/CSSPropertyParserConsumer+Font.cpp:
* Source/WebCore/css/parser/CSSPropertyParserConsumer+Image.cpp:
* Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp:
* Source/WebCore/css/parser/CSSPropertyParserHelpers.h:
* Source/WebCore/css/parser/CSSPropertyParserWorkerSafe.cpp: Removed.
* Source/WebCore/css/parser/CSSPropertyParserWorkerSafe.h: Removed.
* Source/WebCore/css/process-css-properties.py:
* Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp:
* Source/WebCore/style/FilterOperationsBuilder.cpp:
* Source/WebCore/style/FilterOperationsBuilder.h:
* Source/WebCore/style/StyleBuilderConverter.h:
* Source/WebCore/style/StyleBuilderState.cpp:
* Source/WebCore/style/StyleBuilderState.h:

Canonical link: https://commits.webkit.org/283038@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