-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[css-transitions] add parsing support for the
transition-behavior
p…
…roperty 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: web-platform-tests/wpt#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
- Loading branch information
Showing
28 changed files
with
140 additions
and
47 deletions.
There are no files selected for viewing
4 changes: 2 additions & 2 deletions
4
LayoutTests/fast/css/shorthand-mismatched-list-crash-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
Tests reading inline style of transition, and -webkit-transform-origin | ||
https://bugs.webkit.org/show_bug.cgi?id=22594 | ||
|
||
style: 1s, left 3s cubic-bezier(0.2, 0.3, 0.6, 0.8) 2s | ||
style: all 1s ease 0s, left 3s cubic-bezier(0.2, 0.3, 0.6, 0.8) 2s | ||
style: left 30% | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 26 additions & 26 deletions
52
...orted/w3c/web-platform-tests/css/css-transitions/parsing/transition-behavior-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,30 @@ | ||
|
||
FAIL e.style['transition-behavior'] = "normal" should set the property value assert_not_equals: property should be set got disallowed value "" | ||
FAIL Property transition-behavior value 'normal' assert_true: transition-behavior doesn't seem to be supported in the computed style expected true got false | ||
FAIL e.style['transition-behavior'] = "allow-discrete" should set the property value assert_not_equals: property should be set got disallowed value "" | ||
FAIL Property transition-behavior value 'allow-discrete' assert_true: transition-behavior doesn't seem to be supported in the computed style expected true got false | ||
FAIL e.style['transition'] = "allow-discrete display" should set the property value assert_not_equals: property should be set got disallowed value "" | ||
FAIL Property transition value 'allow-discrete display' assert_true: 'allow-discrete display' is a supported value for transition. expected true got false | ||
FAIL e.style['transition'] = "allow-discrete display 3s" should set the property value assert_not_equals: property should be set got disallowed value "" | ||
FAIL Property transition value 'allow-discrete display 3s' assert_true: 'allow-discrete display 3s' is a supported value for transition. expected true got false | ||
FAIL e.style['transition'] = "allow-discrete display 3s 1s" should set the property value assert_not_equals: property should be set got disallowed value "" | ||
FAIL Property transition value 'allow-discrete display 3s 1s' assert_true: 'allow-discrete display 3s 1s' is a supported value for transition. expected true got false | ||
FAIL e.style['transition'] = "allow-discrete display 3s ease-in-out" should set the property value assert_not_equals: property should be set got disallowed value "" | ||
FAIL Property transition value 'allow-discrete display 3s ease-in-out' assert_true: 'allow-discrete display 3s ease-in-out' is a supported value for transition. expected true got false | ||
FAIL e.style['transition'] = "allow-discrete display 3s ease-in-out 1s" should set the property value assert_not_equals: property should be set got disallowed value "" | ||
FAIL Property transition value 'allow-discrete display 3s ease-in-out 1s' assert_true: 'allow-discrete display 3s ease-in-out 1s' is a supported value for transition. expected true got false | ||
PASS e.style['transition-behavior'] = "normal" should set the property value | ||
PASS Property transition-behavior value 'normal' | ||
PASS e.style['transition-behavior'] = "allow-discrete" should set the property value | ||
PASS Property transition-behavior value 'allow-discrete' | ||
PASS e.style['transition'] = "allow-discrete display" should set the property value | ||
PASS Property transition value 'allow-discrete display' | ||
PASS e.style['transition'] = "allow-discrete display 3s" should set the property value | ||
PASS Property transition value 'allow-discrete display 3s' | ||
PASS e.style['transition'] = "allow-discrete display 3s 1s" should set the property value | ||
PASS Property transition value 'allow-discrete display 3s 1s' | ||
PASS e.style['transition'] = "allow-discrete display 3s ease-in-out" should set the property value | ||
PASS Property transition value 'allow-discrete display 3s ease-in-out' | ||
PASS e.style['transition'] = "allow-discrete display 3s ease-in-out 1s" should set the property value | ||
PASS Property transition value 'allow-discrete display 3s ease-in-out 1s' | ||
PASS e.style['transition'] = "asdf display" should not set the property value | ||
PASS e.style['transition'] = "display asdf" should not set the property value | ||
FAIL e.style['transition'] = "display allow-discrete 3s ease-in-out 1s" should set the property value assert_not_equals: property should be set got disallowed value "" | ||
FAIL e.style['transition'] = "display 3s allow-discrete ease-in-out 1s" should set the property value assert_not_equals: property should be set got disallowed value "" | ||
FAIL e.style['transition'] = "display 3s ease-in-out allow-discrete 1s" should set the property value assert_not_equals: property should be set got disallowed value "" | ||
FAIL e.style['transition'] = "display 3s ease-in-out 1s allow-discrete" should set the property value assert_not_equals: property should be set got disallowed value "" | ||
FAIL Property transition value 'display allow-discrete 3s ease-in-out 1s' assert_true: 'display allow-discrete 3s ease-in-out 1s' is a supported value for transition. expected true got false | ||
FAIL Property transition value 'display 3s allow-discrete ease-in-out 1s' assert_true: 'display 3s allow-discrete ease-in-out 1s' is a supported value for transition. expected true got false | ||
FAIL Property transition value 'display 3s ease-in-out allow-discrete 1s' assert_true: 'display 3s ease-in-out allow-discrete 1s' is a supported value for transition. expected true got false | ||
FAIL Property transition value 'display 3s ease-in-out 1s allow-discrete' assert_true: 'display 3s ease-in-out 1s allow-discrete' is a supported value for transition. expected true got false | ||
FAIL e.style['transition'] = "allow-discrete display, normal opacity, color" should set the property value assert_not_equals: property should be set got disallowed value "" | ||
FAIL Property transition value 'allow-discrete display, normal opacity, color' assert_true: 'allow-discrete display, normal opacity, color' is a supported value for transition. expected true got false | ||
FAIL e.style['transition'] = "normal opacity, color, allow-discrete display" should set the property value assert_not_equals: property should be set got disallowed value "" | ||
FAIL Property transition value 'normal opacity, color, allow-discrete display' assert_true: 'normal opacity, color, allow-discrete display' is a supported value for transition. expected true got false | ||
PASS e.style['transition'] = "display allow-discrete 3s ease-in-out 1s" should set the property value | ||
PASS e.style['transition'] = "display 3s allow-discrete ease-in-out 1s" should set the property value | ||
PASS e.style['transition'] = "display 3s ease-in-out allow-discrete 1s" should set the property value | ||
PASS e.style['transition'] = "display 3s ease-in-out 1s allow-discrete" should set the property value | ||
PASS Property transition value 'display allow-discrete 3s ease-in-out 1s' | ||
PASS Property transition value 'display 3s allow-discrete ease-in-out 1s' | ||
PASS Property transition value 'display 3s ease-in-out allow-discrete 1s' | ||
PASS Property transition value 'display 3s ease-in-out 1s allow-discrete' | ||
PASS e.style['transition'] = "allow-discrete display, normal opacity, color" should set the property value | ||
PASS Property transition value 'allow-discrete display, normal opacity, color' | ||
PASS e.style['transition'] = "normal opacity, color, allow-discrete display" should set the property value | ||
PASS Property transition value 'normal opacity, color, allow-discrete display' | ||
|
6 changes: 3 additions & 3 deletions
6
...rted/w3c/web-platform-tests/css/css-transitions/parsing/transition-shorthand-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1744,3 +1744,7 @@ no-autospace | |
// auto | ||
// stable | ||
both-edges | ||
|
||
// transition-behavior | ||
// normal | ||
allow-discrete |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.