Skip to content

Commit bb7d574

Browse files
Calme1709AtkinsSJ
authored andcommitted
LibWeb: Serialize transition as a coordinating list shorthand
1 parent 2e6988d commit bb7d574

File tree

4 files changed

+15
-14
lines changed

4 files changed

+15
-14
lines changed

Libraries/LibWeb/CSS/StyleValues/ShorthandStyleValue.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -838,6 +838,8 @@ String ShorthandStyleValue::to_string(SerializationMode mode) const
838838

839839
return builder.to_string_without_validation();
840840
}
841+
case PropertyID::Transition:
842+
return coordinating_value_list_shorthand_to_string("all"sv);
841843
case PropertyID::WhiteSpace: {
842844
auto white_space_collapse_property = longhand(PropertyID::WhiteSpaceCollapse);
843845
auto text_wrap_mode_property = longhand(PropertyID::TextWrapMode);

Tests/LibWeb/Text/expected/wpt-import/css/css-transitions/parsing/transition-behavior.txt

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ Harness status: OK
22

33
Found 28 tests
44

5-
24 Pass
6-
4 Fail
5+
28 Pass
76
Pass e.style['transition-behavior'] = "normal" should set the property value
87
Pass Property transition-behavior value 'normal'
98
Pass e.style['transition-behavior'] = "allow-discrete" should set the property value
@@ -28,7 +27,7 @@ Pass Property transition value 'display allow-discrete 3s ease-in-out 1s'
2827
Pass Property transition value 'display 3s allow-discrete ease-in-out 1s'
2928
Pass Property transition value 'display 3s ease-in-out allow-discrete 1s'
3029
Pass Property transition value 'display 3s ease-in-out 1s allow-discrete'
31-
Fail e.style['transition'] = "allow-discrete display, normal opacity, color" should set the property value
32-
Fail Property transition value 'allow-discrete display, normal opacity, color'
33-
Fail e.style['transition'] = "normal opacity, color, allow-discrete display" should set the property value
34-
Fail Property transition value 'normal opacity, color, allow-discrete display'
30+
Pass e.style['transition'] = "allow-discrete display, normal opacity, color" should set the property value
31+
Pass Property transition value 'allow-discrete display, normal opacity, color'
32+
Pass e.style['transition'] = "normal opacity, color, allow-discrete display" should set the property value
33+
Pass Property transition value 'normal opacity, color, allow-discrete display'

Tests/LibWeb/Text/expected/wpt-import/css/css-transitions/parsing/transition-computed.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ Harness status: OK
22

33
Found 10 tests
44

5-
6 Pass
6-
4 Fail
5+
9 Pass
6+
1 Fail
77
Pass Default transition value
88
Pass Property transition value '1s'
99
Pass Property transition value 'cubic-bezier(0, -2, 1, 3)'
1010
Pass Property transition value '1s -3s'
1111
Fail Property transition value 'none'
1212
Pass Property transition value 'top'
1313
Pass Property transition value '1s -3s cubic-bezier(0, -2, 1, 3) top'
14-
Fail Property transition value '1s -3s, cubic-bezier(0, -2, 1, 3) top'
15-
Fail Property transition value 'all, all'
16-
Fail Transition with a delay but no duration
14+
Pass Property transition value '1s -3s, cubic-bezier(0, -2, 1, 3) top'
15+
Pass Property transition value 'all, all'
16+
Pass Transition with a delay but no duration

Tests/LibWeb/Text/expected/wpt-import/css/css-transitions/parsing/transition-valid.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ Harness status: OK
22

33
Found 10 tests
44

5-
8 Pass
6-
2 Fail
5+
9 Pass
6+
1 Fail
77
Pass e.style['transition'] = "1s" should set the property value
88
Pass e.style['transition'] = "cubic-bezier(0, -2, 1, 3)" should set the property value
99
Pass e.style['transition'] = "1s -3s" should set the property value
1010
Fail e.style['transition'] = "none" should set the property value
1111
Pass e.style['transition'] = "top" should set the property value
1212
Pass e.style['transition'] = "1s -3s cubic-bezier(0, -2, 1, 3) top" should set the property value
13-
Fail e.style['transition'] = "1s -3s, cubic-bezier(0, -2, 1, 3) top" should set the property value
13+
Pass e.style['transition'] = "1s -3s, cubic-bezier(0, -2, 1, 3) top" should set the property value
1414
Pass e.style['transition'] = "all" should set the property value
1515
Pass e.style['transition'] = "all 1s" should set the property value
1616
Pass e.style['transition'] = "initial" should set the property value

0 commit comments

Comments
 (0)