[webkit-changes] [WebKit/WebKit] 8531e4: CSS transform functions should not eagerly evaluat...
Commit Queue
noreply at github.com
Mon Sep 2 18:04:14 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 8531e44d52ced52c67b8488e359d797577f86b2f
https://github.com/WebKit/WebKit/commit/8531e44d52ced52c67b8488e359d797577f86b2f
Author: Sam Weinig <sam at webkit.org>
Date: 2024-09-02 (Mon, 02 Sep 2024)
Changed paths:
M LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/animation/custom-property-animation-transform-none.tentative-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/animation/custom-property-transition-transform-list-none.tentative-expected.txt
M Source/WebCore/Sources.txt
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
M Source/WebCore/css/CSSCustomPropertyValue.h
M Source/WebCore/css/CSSPrimitiveValue.cpp
M Source/WebCore/css/CSSProperties.json
M Source/WebCore/css/CSSValue.cpp
M Source/WebCore/css/CSSValue.h
M Source/WebCore/css/DOMMatrixReadOnly.cpp
R Source/WebCore/css/TransformFunctions.cpp
R Source/WebCore/css/TransformFunctions.h
M Source/WebCore/css/parser/CSSPropertyParser.cpp
A Source/WebCore/css/parser/CSSPropertyParserConsumer+Transform.cpp
A Source/WebCore/css/parser/CSSPropertyParserConsumer+Transform.h
M Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp
M Source/WebCore/css/parser/CSSPropertyParserHelpers.h
M Source/WebCore/css/process-css-properties.py
M Source/WebCore/style/FilterOperationsBuilder.cpp
M Source/WebCore/style/StyleBuilderConverter.h
M Source/WebCore/style/StyleBuilderState.cpp
M Source/WebCore/style/StylePendingResources.cpp
A Source/WebCore/style/TransformOperationsBuilder.cpp
A Source/WebCore/style/TransformOperationsBuilder.h
Log Message:
-----------
CSS transform functions should not eagerly evaluate calc()
https://bugs.webkit.org/show_bug.cgi?id=278993
Reviewed by Darin Adler.
Refactors CSS transform parsing and style building code. Moves
parsing into new CSSPropertyParserConsumer+Transform.h/cpp files
and style building into new TransformOperationsBuilder.h/cpp,
matching the pattern used for filters.
To make things a bit more structured, each individual transform
function has been given their own parsing and style building
functions, consumeFooFunctionArguments and createFooTransformOperation
respectively, each with a spec link and grammar definition.
This makes it really clear and will help with the incremental
move to toward generated versions in the future.
A few uses of "deprecated" primitive value resolvers were removed
from `consumeScale` and `consumeRotate`, replaced with calc()
aware accessors.
Following the precedent set by color parsing, and more recently
filter parsing, a "raw" parsing from string function was added
for transforms to allow `DOMMatrixReadOnly` to parse a transform
without spinning up all the CSSParser / MutableStyleProperties
infrastructure. To keep the behavior that this fails if the
parsed value contains relative lengths, the code to check if
dependencies can be resolved by a specific instance of
`CSSToLengthConversionData` was factored out of CSSPrimitiveValue
and into CSSValue and used in parseTransformRaw.
* LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/animation/custom-property-animation-transform-none.tentative-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/animation/custom-property-transition-transform-list-none.tentative-expected.txt:
- Update results for now passing tests.
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/css/CSSProperties.json:
* Source/WebCore/css/DOMMatrixReadOnly.cpp:
* Source/WebCore/css/TransformFunctions.cpp: Removed.
* Source/WebCore/css/parser/CSSPropertyParser.cpp:
* Source/WebCore/css/parser/CSSPropertyParserConsumer+Transform.cpp: Added.
* Source/WebCore/css/parser/CSSPropertyParserConsumer+Transform.h: Added.
* Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp:
* Source/WebCore/css/parser/CSSPropertyParserHelpers.h:
* Source/WebCore/css/process-css-properties.py:
* Source/WebCore/style/FilterOperationsBuilder.cpp:
* Source/WebCore/style/StyleBuilderConverter.h:
* Source/WebCore/style/StyleBuilderState.cpp:
* Source/WebCore/style/StylePendingResources.cpp:
* Source/WebCore/style/TransformOperationsBuilder.cpp: Renamed from Source/WebCore/css/TransformFunctions.cpp.
* Source/WebCore/style/TransformOperationsBuilder.h: Renamed from Source/WebCore/css/TransformFunctions.h.
Canonical link: https://commits.webkit.org/283074@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