LibWeb: Serialize transition as a coordinating list shorthand

This commit is contained in:
Callum Law 2025-10-19 15:19:36 +13:00 committed by Sam Atkins
parent 2e6988d681
commit bb7d5747e7
Notes: github-actions[bot] 2025-10-23 09:11:18 +00:00
4 changed files with 15 additions and 14 deletions

View file

@ -838,6 +838,8 @@ String ShorthandStyleValue::to_string(SerializationMode mode) const
return builder.to_string_without_validation(); return builder.to_string_without_validation();
} }
case PropertyID::Transition:
return coordinating_value_list_shorthand_to_string("all"sv);
case PropertyID::WhiteSpace: { case PropertyID::WhiteSpace: {
auto white_space_collapse_property = longhand(PropertyID::WhiteSpaceCollapse); auto white_space_collapse_property = longhand(PropertyID::WhiteSpaceCollapse);
auto text_wrap_mode_property = longhand(PropertyID::TextWrapMode); auto text_wrap_mode_property = longhand(PropertyID::TextWrapMode);

View file

@ -2,8 +2,7 @@ Harness status: OK
Found 28 tests Found 28 tests
24 Pass 28 Pass
4 Fail
Pass e.style['transition-behavior'] = "normal" should set the property value Pass e.style['transition-behavior'] = "normal" should set the property value
Pass Property transition-behavior value 'normal' Pass Property transition-behavior value 'normal'
Pass e.style['transition-behavior'] = "allow-discrete" should set the property value 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'
Pass Property transition value 'display 3s allow-discrete 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 allow-discrete 1s'
Pass Property transition value 'display 3s ease-in-out 1s allow-discrete' Pass Property transition value 'display 3s ease-in-out 1s allow-discrete'
Fail e.style['transition'] = "allow-discrete display, normal opacity, color" should set the property value Pass e.style['transition'] = "allow-discrete display, normal opacity, color" should set the property value
Fail Property transition value 'allow-discrete display, normal opacity, color' Pass Property transition value 'allow-discrete display, normal opacity, color'
Fail e.style['transition'] = "normal opacity, color, allow-discrete display" should set the property value Pass e.style['transition'] = "normal opacity, color, allow-discrete display" should set the property value
Fail Property transition value 'normal opacity, color, allow-discrete display' Pass Property transition value 'normal opacity, color, allow-discrete display'

View file

@ -2,8 +2,8 @@ Harness status: OK
Found 10 tests Found 10 tests
6 Pass 9 Pass
4 Fail 1 Fail
Pass Default transition value Pass Default transition value
Pass Property transition value '1s' Pass Property transition value '1s'
Pass Property transition value 'cubic-bezier(0, -2, 1, 3)' Pass Property transition value 'cubic-bezier(0, -2, 1, 3)'
@ -11,6 +11,6 @@ Pass Property transition value '1s -3s'
Fail Property transition value 'none' Fail Property transition value 'none'
Pass Property transition value 'top' Pass Property transition value 'top'
Pass Property transition value '1s -3s cubic-bezier(0, -2, 1, 3) top' Pass Property transition value '1s -3s cubic-bezier(0, -2, 1, 3) top'
Fail Property transition value '1s -3s, cubic-bezier(0, -2, 1, 3) top' Pass Property transition value '1s -3s, cubic-bezier(0, -2, 1, 3) top'
Fail Property transition value 'all, all' Pass Property transition value 'all, all'
Fail Transition with a delay but no duration Pass Transition with a delay but no duration

View file

@ -2,15 +2,15 @@ Harness status: OK
Found 10 tests Found 10 tests
8 Pass 9 Pass
2 Fail 1 Fail
Pass e.style['transition'] = "1s" should set the property value Pass e.style['transition'] = "1s" should set the property value
Pass e.style['transition'] = "cubic-bezier(0, -2, 1, 3)" should set the property value Pass e.style['transition'] = "cubic-bezier(0, -2, 1, 3)" should set the property value
Pass e.style['transition'] = "1s -3s" should set the property value Pass e.style['transition'] = "1s -3s" should set the property value
Fail e.style['transition'] = "none" should set the property value Fail e.style['transition'] = "none" should set the property value
Pass e.style['transition'] = "top" should set the property value Pass e.style['transition'] = "top" should set the property value
Pass e.style['transition'] = "1s -3s cubic-bezier(0, -2, 1, 3) top" should set the property value Pass e.style['transition'] = "1s -3s cubic-bezier(0, -2, 1, 3) top" should set the property value
Fail e.style['transition'] = "1s -3s, cubic-bezier(0, -2, 1, 3) top" should set the property value Pass e.style['transition'] = "1s -3s, cubic-bezier(0, -2, 1, 3) top" should set the property value
Pass e.style['transition'] = "all" should set the property value Pass e.style['transition'] = "all" should set the property value
Pass e.style['transition'] = "all 1s" should set the property value Pass e.style['transition'] = "all 1s" should set the property value
Pass e.style['transition'] = "initial" should set the property value Pass e.style['transition'] = "initial" should set the property value