Skip to content

Commit

Permalink
[css-transitions] add parsing support for the transition-behavior p…
Browse files Browse the repository at this point in the history
…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
graouts committed Dec 8, 2023
1 parent 4485c48 commit a0f7f0b
Show file tree
Hide file tree
Showing 28 changed files with 140 additions and 47 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Test for WebKit bug 31559: Crash with mismatched lists and shorthands.

PASS para.style.webkitTransition is "width 1s, left 1s, 1s"
PASS para.style.webkitTransition is "width 1s, left 1s, top"
PASS para.style.webkitTransition is "width 1s ease 0s, left 1s ease 0s, all 1s ease 0s"
PASS para.style.webkitTransition is "width 1s ease 0s, left 1s ease 0s, top 0s ease 0s"
PASS successfullyParsed is true

TEST COMPLETE
Expand Down
4 changes: 2 additions & 2 deletions LayoutTests/fast/css/shorthand-mismatched-list-crash.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
para.style.webkitTransition = 'width 1s, left 1s, top 1s';
para.style.webkitTransitionProperty = 'width, left';

shouldBeEqualToString("para.style.webkitTransition", "width 1s, left 1s, 1s");
shouldBeEqualToString("para.style.webkitTransition", "width 1s ease 0s, left 1s ease 0s, all 1s ease 0s");

// Test shorter shorthand
para.style.webkitTransition = 'width 1s, left 1s';
para.style.webkitTransitionProperty = 'width, left, top';

// the next line will crash
shouldBeEqualToString("para.style.webkitTransition", "width 1s, left 1s, top");
shouldBeEqualToString("para.style.webkitTransition", "width 1s ease 0s, left 1s ease 0s, top 0s ease 0s");
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
Expand Down
2 changes: 1 addition & 1 deletion LayoutTests/fast/css/transform-inline-style-expected.txt
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%

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ https://bugs.webkit.org/show_bug.cgi?id=22605

All "after" results should be null/empty

transition (before): 1s, left 3s cubic-bezier(0.2, 0.3, 0.6, 0.8) 2s
transition (before): all 1s ease 0s, left 3s cubic-bezier(0.2, 0.3, 0.6, 0.8) 2s
transition property (before): all, left
transition duration (before): 1s, 3s
transition timing function (before): ease, cubic-bezier(0.2, 0.3, 0.6, 0.8)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,7 @@ PASS transform
PASS transform-box
PASS transform-origin
PASS transform-style
PASS transition-behavior
PASS transition-delay
PASS transition-duration
PASS transition-property
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,7 @@ PASS transform
PASS transform-box
PASS transform-origin
PASS transform-style
PASS transition-behavior
PASS transition-delay
PASS transition-duration
PASS transition-property
Expand Down
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'

Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@

FAIL e.style['transition'] = "1s -3s cubic-bezier(0, -2, 1, 3) top" should set transition-behavior assert_equals: transition-behavior should be canonical expected (string) "normal" but got (undefined) undefined
PASS e.style['transition'] = "1s -3s cubic-bezier(0, -2, 1, 3) top" should set transition-behavior
PASS e.style['transition'] = "1s -3s cubic-bezier(0, -2, 1, 3) top" should set transition-delay
PASS e.style['transition'] = "1s -3s cubic-bezier(0, -2, 1, 3) top" should set transition-duration
PASS e.style['transition'] = "1s -3s cubic-bezier(0, -2, 1, 3) top" should set transition-property
PASS e.style['transition'] = "1s -3s cubic-bezier(0, -2, 1, 3) top" should set transition-timing-function
PASS e.style['transition'] = "1s -3s cubic-bezier(0, -2, 1, 3) top" should not set unrelated longhands
FAIL e.style['transition'] = "1s -3s, cubic-bezier(0, -2, 1, 3) top" should set transition-behavior assert_equals: transition-behavior should be canonical expected (string) "normal, normal" but got (undefined) undefined
PASS e.style['transition'] = "1s -3s, cubic-bezier(0, -2, 1, 3) top" should set transition-behavior
PASS e.style['transition'] = "1s -3s, cubic-bezier(0, -2, 1, 3) top" should set transition-delay
PASS e.style['transition'] = "1s -3s, cubic-bezier(0, -2, 1, 3) top" should set transition-duration
PASS e.style['transition'] = "1s -3s, cubic-bezier(0, -2, 1, 3) top" should set transition-property
PASS e.style['transition'] = "1s -3s, cubic-bezier(0, -2, 1, 3) top" should set transition-timing-function
PASS e.style['transition'] = "1s -3s, cubic-bezier(0, -2, 1, 3) top" should not set unrelated longhands
FAIL e.style['transition'] = "cubic-bezier(0, -2, 1, 3) top, 1s -3s" should set transition-behavior assert_equals: transition-behavior should be canonical expected (string) "normal, normal" but got (undefined) undefined
PASS e.style['transition'] = "cubic-bezier(0, -2, 1, 3) top, 1s -3s" should set transition-behavior
PASS e.style['transition'] = "cubic-bezier(0, -2, 1, 3) top, 1s -3s" should set transition-delay
PASS e.style['transition'] = "cubic-bezier(0, -2, 1, 3) top, 1s -3s" should set transition-duration
PASS e.style['transition'] = "cubic-bezier(0, -2, 1, 3) top, 1s -3s" should set transition-property
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,7 @@ PASS transform
PASS transform-box
PASS transform-origin
PASS transform-style
PASS transition-behavior
PASS transition-delay
PASS transition-duration
PASS transition-property
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,7 @@ PASS transform
PASS transform-box
PASS transform-origin
PASS transform-style
PASS transition-behavior
PASS transition-delay
PASS transition-duration
PASS transition-property
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,7 @@ PASS transform
PASS transform-box
PASS transform-origin
PASS transform-style
PASS transition-behavior
PASS transition-delay
PASS transition-duration
PASS transition-property
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,7 @@ PASS transform
PASS transform-box
PASS transform-origin
PASS transform-style
PASS transition-behavior
PASS transition-delay
PASS transition-duration
PASS transition-property
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@ PASS transform
PASS transform-box
PASS transform-origin
PASS transform-style
PASS transition-behavior
PASS transition-delay
PASS transition-duration
PASS transition-property
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,7 @@ PASS transform
PASS transform-box
PASS transform-origin
PASS transform-style
PASS transition-behavior
PASS transition-delay
PASS transition-duration
PASS transition-property
Expand Down
1 change: 1 addition & 0 deletions Source/WebCore/animation/CSSPropertyAnimation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4138,6 +4138,7 @@ CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap()
case CSSPropertyTextDecorationSkip:
case CSSPropertyTextUnderlinePosition:
case CSSPropertyTransition:
case CSSPropertyTransitionBehavior:
case CSSPropertyTransitionDelay:
case CSSPropertyTransitionDuration:
case CSSPropertyTransitionProperty:
Expand Down
27 changes: 26 additions & 1 deletion Source/WebCore/css/CSSProperties.json
Original file line number Diff line number Diff line change
Expand Up @@ -6012,14 +6012,31 @@
"transition-property",
"transition-duration",
"transition-timing-function",
"transition-delay"
"transition-delay",
"transition-behavior"
]
},
"specification": {
"category": "css-transitions",
"url": "https://www.w3.org/TR/css3-transitions/#transition-shorthand-property"
}
},
"transition-behavior": {
"values": [
"normal",
"allow-discrete"
],
"animatable": true,
"codegen-properties": {
"name-for-methods": "AllowsDiscreteTransitions",
"separator": ",",
"parser-grammar": "<transition-behavior-value>#"
},
"specification": {
"category": "css-transitions",
"url": "https://drafts.csswg.org/css-transitions-2/#transition-behavior-property"
}
},
"transition-delay": {
"animatable": true,
"codegen-properties": {
Expand Down Expand Up @@ -10663,6 +10680,14 @@
"url": "https://www.w3.org/TR/css-animations-1/#typedef-single-animation-play-state"
}
},
"<transition-behavior-value>": {
"grammar": "normal | allow-discrete",
"exported": true,
"specification": {
"category": "css-transitions",
"url": "https://drafts.csswg.org/css-transitions-2/#typedef-transition-behavior-value"
}
},
"<page-size>": {
"grammar": "A5 | A4 | A3 | B5 | B4 | letter | legal | ledger",
"exported": true,
Expand Down
8 changes: 8 additions & 0 deletions Source/WebCore/css/CSSToStyleMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,14 @@ void CSSToStyleMap::mapAnimationCompositeOperation(Animation& animation, const C
animation.setCompositeOperation(*compositeOperation);
}

void CSSToStyleMap::mapAnimationAllowsDiscreteTransitions(Animation& layer, const CSSValue& value)
{
if (treatAsInitialValue(value, CSSPropertyTransitionBehavior))
layer.setAllowsDiscreteTransitions(Animation::initialAllowsDiscreteTransitions());
else if (is<CSSPrimitiveValue>(value))
layer.setAllowsDiscreteTransitions(value.valueID() == CSSValueAllowDiscrete);
}

void CSSToStyleMap::mapNinePieceImage(const CSSValue* value, NinePieceImage& image)
{
// If we're not a value list, then we are "none" and don't need to alter the empty image at all.
Expand Down
1 change: 1 addition & 0 deletions Source/WebCore/css/CSSToStyleMap.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ class CSSToStyleMap {
static void mapAnimationTimeline(Animation&, const CSSValue&);
static void mapAnimationTimingFunction(Animation&, const CSSValue&);
static void mapAnimationCompositeOperation(Animation&, const CSSValue&);
static void mapAnimationAllowsDiscreteTransitions(Animation&, const CSSValue&);

void mapNinePieceImage(const CSSValue*, NinePieceImage&);
static void mapNinePieceImageSlice(const CSSValue&, NinePieceImage&);
Expand Down
4 changes: 4 additions & 0 deletions Source/WebCore/css/CSSValueKeywords.in
Original file line number Diff line number Diff line change
Expand Up @@ -1744,3 +1744,7 @@ no-autospace
// auto
// stable
both-edges

// transition-behavior
// normal
allow-discrete
25 changes: 20 additions & 5 deletions Source/WebCore/css/ComputedStyleExtractor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1434,6 +1434,11 @@ static Ref<CSSValue> fontVariantEastAsianPropertyValue(FontVariantEastAsianVaria
return CSSValueList::createSpaceSeparated(WTFMove(valueList));
}

static Ref<CSSPrimitiveValue> valueForTransitionBehavior(bool allowsDiscreteTransitions)
{
return CSSPrimitiveValue::create(allowsDiscreteTransitions ? CSSValueAllowDiscrete : CSSValueNormal);
}

static Ref<CSSPrimitiveValue> valueForAnimationDuration(double duration)
{
return CSSPrimitiveValue::create(duration, CSSUnitType::CSS_S);
Expand Down Expand Up @@ -1570,9 +1575,18 @@ static Ref<CSSValue> valueForAnimationTimingFunction(const TimingFunction& timin
RELEASE_ASSERT_NOT_REACHED();
}

void ComputedStyleExtractor::addValueForAnimationPropertyToList(CSSValueListBuilder& list, CSSPropertyID property, const Animation* animation)
enum IsShorthand : bool { No, Yes };
static void addValueForAnimationPropertyToList(CSSValueListBuilder& list, CSSPropertyID property, const Animation* animation, IsShorthand isShorthand = IsShorthand::No)
{
if (property == CSSPropertyAnimationDuration || property == CSSPropertyTransitionDuration) {
if (property == CSSPropertyTransitionBehavior) {
if (animation) {
if (animation->isAllowsDiscreteTransitionsFilled())
return;
if (isShorthand == IsShorthand::Yes && animation->allowsDiscreteTransitions() == Animation::initialAllowsDiscreteTransitions())
return;
}
list.append(valueForTransitionBehavior(animation ? animation->allowsDiscreteTransitions() : Animation::initialAllowsDiscreteTransitions()));
} else if (property == CSSPropertyAnimationDuration || property == CSSPropertyTransitionDuration) {
if (!animation || !animation->isDurationFilled())
list.append(valueForAnimationDuration(animation ? animation->duration() : Animation::initialDuration()));
} else if (property == CSSPropertyAnimationDelay || property == CSSPropertyTransitionDelay) {
Expand Down Expand Up @@ -1619,9 +1633,9 @@ static Ref<CSSValueList> valueListForAnimationOrTransitionProperty(CSSPropertyID
CSSValueListBuilder list;
if (animationList) {
for (auto& animation : *animationList)
ComputedStyleExtractor::addValueForAnimationPropertyToList(list, property, animation.ptr());
addValueForAnimationPropertyToList(list, property, animation.ptr());
} else
ComputedStyleExtractor::addValueForAnimationPropertyToList(list, property, nullptr);
addValueForAnimationPropertyToList(list, property, nullptr);
return CSSValueList::createCommaSeparated(WTFMove(list));
}

Expand All @@ -1631,7 +1645,7 @@ static Ref<CSSValueList> animationShorthandValue(CSSPropertyID property, const A
auto addAnimation = [&](Ref<Animation> animation) {
CSSValueListBuilder childList;
for (auto longhand : shorthandForProperty(property))
ComputedStyleExtractor::addValueForAnimationPropertyToList(childList, longhand, animation.ptr());
addValueForAnimationPropertyToList(childList, longhand, animation.ptr(), IsShorthand::Yes);
parentList.append(CSSValueList::createSpaceSeparated(WTFMove(childList)));
};
if (animationList && !animationList->isEmpty()) {
Expand Down Expand Up @@ -4191,6 +4205,7 @@ RefPtr<CSSValue> ComputedStyleExtractor::valueForPropertyInStyle(const RenderSty
return computedScale(renderer, style);
case CSSPropertyRotate:
return computedRotate(renderer, style);
case CSSPropertyTransitionBehavior:
case CSSPropertyTransitionDelay:
case CSSPropertyTransitionDuration:
case CSSPropertyTransitionTimingFunction:
Expand Down
2 changes: 0 additions & 2 deletions Source/WebCore/css/ComputedStyleExtractor.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,6 @@ class ComputedStyleExtractor {

static Ref<CSSPrimitiveValue> currentColorOrValidColor(const RenderStyle&, const StyleColor&);

static void addValueForAnimationPropertyToList(CSSValueListBuilder&, CSSPropertyID, const Animation*);

static bool updateStyleIfNeededForProperty(Element&, CSSPropertyID);

private:
Expand Down
Loading

0 comments on commit a0f7f0b

Please sign in to comment.