From ecd6636b3e03e7d5ebd53d62e1ff24e0820cec82 Mon Sep 17 00:00:00 2001 From: Tim Ledbetter Date: Sat, 22 Mar 2025 00:50:02 +0000 Subject: [PATCH] LibWeb/CSS: Use "0s" as the initial value for `animation-duration` --- Libraries/LibWeb/CSS/Properties.json | 2 +- ...upported-properties-and-default-values.txt | 18 ++++++------ .../css/getComputedStyle-print-all.txt | 2 +- .../interpolation-longhand-properties.txt | 4 +-- .../css/css-animations/inheritance.txt | 21 ++++++++++++++ .../css/css-animations/inheritance.html | 28 +++++++++++++++++++ 6 files changed, 62 insertions(+), 13 deletions(-) create mode 100644 Tests/LibWeb/Text/expected/wpt-import/css/css-animations/inheritance.txt create mode 100644 Tests/LibWeb/Text/input/wpt-import/css/css-animations/inheritance.html diff --git a/Libraries/LibWeb/CSS/Properties.json b/Libraries/LibWeb/CSS/Properties.json index 8583f0610b0..f06bb35e5a9 100644 --- a/Libraries/LibWeb/CSS/Properties.json +++ b/Libraries/LibWeb/CSS/Properties.json @@ -208,7 +208,7 @@ "affects-layout": false, "animation-type": "none", "inherited": false, - "initial": "auto", + "initial": "0s", "valid-types": [ "time [0,∞]" ], diff --git a/Tests/LibWeb/Text/expected/css/CSSStyleProperties-all-supported-properties-and-default-values.txt b/Tests/LibWeb/Text/expected/css/CSSStyleProperties-all-supported-properties-and-default-values.txt index cbc50ebce1d..df8950a0055 100644 --- a/Tests/LibWeb/Text/expected/css/CSSStyleProperties-all-supported-properties-and-default-values.txt +++ b/Tests/LibWeb/Text/expected/css/CSSStyleProperties-all-supported-properties-and-default-values.txt @@ -9,18 +9,18 @@ All supported properties and their default values exposed from CSSStylePropertie 'WebkitAlignSelf': 'auto' 'webkitAlignSelf': 'auto' '-webkit-align-self': 'auto' -'WebkitAnimation': 'none auto ease 1 normal running 0s none' -'webkitAnimation': 'none auto ease 1 normal running 0s none' -'-webkit-animation': 'none auto ease 1 normal running 0s none' +'WebkitAnimation': 'none 0s ease 1 normal running 0s none' +'webkitAnimation': 'none 0s ease 1 normal running 0s none' +'-webkit-animation': 'none 0s ease 1 normal running 0s none' 'WebkitAnimationDelay': '0s' 'webkitAnimationDelay': '0s' '-webkit-animation-delay': '0s' 'WebkitAnimationDirection': 'normal' 'webkitAnimationDirection': 'normal' '-webkit-animation-direction': 'normal' -'WebkitAnimationDuration': 'auto' -'webkitAnimationDuration': 'auto' -'-webkit-animation-duration': 'auto' +'WebkitAnimationDuration': '0s' +'webkitAnimationDuration': '0s' +'-webkit-animation-duration': '0s' 'WebkitAnimationFillMode': 'none' 'webkitAnimationFillMode': 'none' '-webkit-animation-fill-mode': 'none' @@ -137,13 +137,13 @@ All supported properties and their default values exposed from CSSStylePropertie 'align-items': 'normal' 'alignSelf': 'auto' 'align-self': 'auto' -'animation': 'none auto ease 1 normal running 0s none' +'animation': 'none 0s ease 1 normal running 0s none' 'animationDelay': '0s' 'animation-delay': '0s' 'animationDirection': 'normal' 'animation-direction': 'normal' -'animationDuration': 'auto' -'animation-duration': 'auto' +'animationDuration': '0s' +'animation-duration': '0s' 'animationFillMode': 'none' 'animation-fill-mode': 'none' 'animationIterationCount': '1' diff --git a/Tests/LibWeb/Text/expected/css/getComputedStyle-print-all.txt b/Tests/LibWeb/Text/expected/css/getComputedStyle-print-all.txt index 0b0a4b68c9f..f31b7430c0a 100644 --- a/Tests/LibWeb/Text/expected/css/getComputedStyle-print-all.txt +++ b/Tests/LibWeb/Text/expected/css/getComputedStyle-print-all.txt @@ -65,7 +65,7 @@ align-items: normal align-self: auto animation-delay: 0s animation-direction: normal -animation-duration: auto +animation-duration: 0s animation-fill-mode: none animation-iteration-count: 1 animation-name: none diff --git a/Tests/LibWeb/Text/expected/interpolation-longhand-properties.txt b/Tests/LibWeb/Text/expected/interpolation-longhand-properties.txt index 287378c0073..24f19890935 100644 --- a/Tests/LibWeb/Text/expected/interpolation-longhand-properties.txt +++ b/Tests/LibWeb/Text/expected/interpolation-longhand-properties.txt @@ -1,7 +1,7 @@ At time 400: accent-color: rgb(78, 88, 99) align-content: flex-start - animation-duration: auto + animation-duration: 0s aspect-ratio: 1.54415 / 1 background-color: rgb(78, 88, 99) background-repeat: repeat-x @@ -13,7 +13,7 @@ At time 400: At time 750: accent-color: rgb(147, 157, 168) align-content: space-between - animation-duration: auto + animation-duration: 0s aspect-ratio: 1.36506 / 1 background-color: rgb(147, 157, 168) background-repeat: space diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-animations/inheritance.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-animations/inheritance.txt new file mode 100644 index 00000000000..f880d857f9a --- /dev/null +++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-animations/inheritance.txt @@ -0,0 +1,21 @@ +Harness status: OK + +Found 16 tests + +16 Pass +Pass Property animation-delay has initial value 0s +Pass Property animation-delay does not inherit +Pass Property animation-direction has initial value normal +Pass Property animation-direction does not inherit +Pass Property animation-duration has initial value 0s +Pass Property animation-duration does not inherit +Pass Property animation-fill-mode has initial value none +Pass Property animation-fill-mode does not inherit +Pass Property animation-iteration-count has initial value 1 +Pass Property animation-iteration-count does not inherit +Pass Property animation-name has initial value none +Pass Property animation-name does not inherit +Pass Property animation-play-state has initial value running +Pass Property animation-play-state does not inherit +Pass Property animation-timing-function has initial value ease +Pass Property animation-timing-function does not inherit \ No newline at end of file diff --git a/Tests/LibWeb/Text/input/wpt-import/css/css-animations/inheritance.html b/Tests/LibWeb/Text/input/wpt-import/css/css-animations/inheritance.html new file mode 100644 index 00000000000..907313e577e --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/css/css-animations/inheritance.html @@ -0,0 +1,28 @@ + + + + +Inheritance of CSS Animations properties + + + + + + + + +
+
+
+ + +