[webkit-changes] [WebKit/WebKit] a0f7f0: [css-transitions] add parsing support for the `tra...

Antoine Quint noreply at github.com
Fri Dec 8 14:34:57 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: a0f7f0bc002c88904ebd534d3daa2d12d92c1545
      https://github.com/WebKit/WebKit/commit/a0f7f0bc002c88904ebd534d3daa2d12d92c1545
  Author: Antoine Quint <graouts at webkit.org>
  Date:   2023-12-08 (Fri, 08 Dec 2023)

  Changed paths:
    M LayoutTests/fast/css/shorthand-mismatched-list-crash-expected.txt
    M LayoutTests/fast/css/shorthand-mismatched-list-crash.html
    M LayoutTests/fast/css/transform-inline-style-expected.txt
    M LayoutTests/fast/css/transform-inline-style-remove-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/parsing/transition-behavior-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/parsing/transition-shorthand-expected.txt
    M LayoutTests/platform/gtk/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt
    M LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt
    M LayoutTests/platform/ipad/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt
    M LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt
    M LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer-expected.txt
    M LayoutTests/platform/wpe/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt
    M Source/WebCore/animation/CSSPropertyAnimation.cpp
    M Source/WebCore/css/CSSProperties.json
    M Source/WebCore/css/CSSToStyleMap.cpp
    M Source/WebCore/css/CSSToStyleMap.h
    M Source/WebCore/css/CSSValueKeywords.in
    M Source/WebCore/css/ComputedStyleExtractor.cpp
    M Source/WebCore/css/ComputedStyleExtractor.h
    M Source/WebCore/css/ShorthandSerializer.cpp
    M Source/WebCore/css/StylePropertyShorthand.cpp
    M Source/WebCore/css/parser/CSSPropertyParser.cpp
    M Source/WebCore/platform/animation/Animation.cpp
    M Source/WebCore/platform/animation/Animation.h
    M Source/WebCore/platform/animation/AnimationList.cpp
    M Source/WebCore/style/PropertyAllowlist.cpp

  Log Message:
  -----------
  [css-transitions] add parsing support for the `transition-behavior` property
https://bugs.webkit.org/show_bug.cgi?id=266071
rdar://119378989

Reviewed by Tim Nguyen.

We add parsing support for the new `transition-behavior` property which we represent as a simple
boolean on the backing Animation object created for each group of `transition-` properties.

We make adjustments in this patch to always serialize the previously-existing `transition-`
properties for the `transition` shorthand to pass the tests in the existing WPT tests. The
new `transition-behavior` property is handled differently where it only gets serialized if
it cannot be omitted.

An issue was filed to see if the relevant tests are indeed correct: https://github.com/web-platform-tests/wpt/issues/43574.

* LayoutTests/fast/css/shorthand-mismatched-list-crash-expected.txt:
* LayoutTests/fast/css/shorthand-mismatched-list-crash.html:
* LayoutTests/fast/css/transform-inline-style-expected.txt:
* LayoutTests/fast/css/transform-inline-style-remove-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/parsing/transition-behavior-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/parsing/transition-shorthand-expected.txt:
* LayoutTests/platform/gtk/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
* LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
* LayoutTests/platform/ipad/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
* LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
* LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer-expected.txt:
* LayoutTests/platform/wpe/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
* Source/WebCore/animation/CSSPropertyAnimation.cpp:
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
* Source/WebCore/css/CSSProperties.json:
* Source/WebCore/css/CSSToStyleMap.cpp:
(WebCore::CSSToStyleMap::mapAnimationAllowsDiscreteTransitions):
* Source/WebCore/css/CSSToStyleMap.h:
* Source/WebCore/css/CSSValueKeywords.in:
* Source/WebCore/css/ComputedStyleExtractor.cpp:
(WebCore::valueForTransitionBehavior):
(WebCore::addValueForAnimationPropertyToList):
(WebCore::valueListForAnimationOrTransitionProperty):
(WebCore::animationShorthandValue):
(WebCore::ComputedStyleExtractor::valueForPropertyInStyle const):
(WebCore::ComputedStyleExtractor::addValueForAnimationPropertyToList): Deleted.
* Source/WebCore/css/ComputedStyleExtractor.h:
* Source/WebCore/css/ShorthandSerializer.cpp:
(WebCore::ShorthandSerializer::serializeLayered const):
* Source/WebCore/css/StylePropertyShorthand.cpp:
(WebCore::transitionShorthandForParsing):
* Source/WebCore/css/parser/CSSPropertyParser.cpp:
(WebCore::initialValueForLonghand):
(WebCore::consumeAnimationValueForShorthand):
* Source/WebCore/platform/animation/Animation.cpp:
(WebCore::Animation::Animation):
(WebCore::Animation::animationsMatch const):
* Source/WebCore/platform/animation/Animation.h:
(WebCore::Animation::isAllowsDiscreteTransitionsSet const):
(WebCore::Animation::isEmpty const):
(WebCore::Animation::clearAllowsDiscreteTransitions):
(WebCore::Animation::clearAll):
(WebCore::Animation::fillAllowsDiscreteTransitions):
(WebCore::Animation::isAllowsDiscreteTransitionsFilled const):
(WebCore::Animation::setAllowsDiscreteTransitions):
(WebCore::Animation::allowsDiscreteTransitions const):
(WebCore::Animation::initialAllowsDiscreteTransitions):
* Source/WebCore/platform/animation/AnimationList.cpp:
(WebCore::AnimationList::fillUnsetProperties):
* Source/WebCore/style/PropertyAllowlist.cpp:
(WebCore::Style::isValidMarkerStyleProperty):

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




More information about the webkit-changes mailing list