Skip to content

Truly independent web browser

LibWeb: Animate `resize`, `scroll-behavior` and the math properties

Tim Ledbetterc768faa0c82b
diff --git a/Libraries/LibWeb/CSS/Properties.json b/Libraries/LibWeb/CSS/Properties.json
index e968710494d..9e4e114b7bf 100644
--- a/Libraries/LibWeb/CSS/Properties.json
+++ b/Libraries/LibWeb/CSS/Properties.json
@@ -3667,7 +3667,7 @@
"initial": "luminance"
},
"math-depth": {
- "animation-type": "none",
+ "animation-type": "by-computed-value",
"inherited": true,
"initial": "0",
"needs-layout-node-for-resolved-value": true,
@@ -3681,7 +3681,7 @@
]
},
"math-shift": {
- "animation-type": "none",
+ "animation-type": "discrete",
"inherited": true,
"initial": "normal",
"requires-computation": "never",
@@ -3690,7 +3690,7 @@
]
},
"math-style": {
- "animation-type": "none",
+ "animation-type": "discrete",
"inherited": true,
"initial": "normal",
"requires-computation": "never",
@@ -4612,7 +4612,7 @@
"resize": {
"affects-hit-testing": true,
"style-group": "BoxValues",
- "animation-type": "none",
+ "animation-type": "discrete",
"inherited": false,
"affects-layout": false,
"initial": "none",
@@ -4717,11 +4717,12 @@
"requires-computation": "cascaded-value"
},
"scroll-behavior": {
+ "__comment": "INTEROP: The spec says 'not animatable', but we animate it discretely, matching other engines. See https://github.com/w3c/csswg-drafts/issues/14706",
"style-group": "MiscResetValues",
"initial": "auto",
"inherited": false,
"affects-layout": false,
- "animation-type": "none",
+ "animation-type": "discrete",
"requires-computation": "never",
"valid-identifiers": [
"auto",
diff --git a/Tests/LibWeb/Text/expected/wpt-import/web-animations/animation-model/animation-types/accumulation-per-property-002.txt b/Tests/LibWeb/Text/expected/wpt-import/web-animations/animation-model/animation-types/accumulation-per-property-002.txt
index 2cf8e2cf8e4..8af68c14e28 100644
--- a/Tests/LibWeb/Text/expected/wpt-import/web-animations/animation-model/animation-types/accumulation-per-property-002.txt
+++ b/Tests/LibWeb/Text/expected/wpt-import/web-animations/animation-model/animation-types/accumulation-per-property-002.txt
@@ -1,8 +1,8 @@
Harness status: OK
-Found 345 tests
+Found 359 tests
-335 Pass
+349 Pass
10 Fail
Pass Setup
Pass isolation (type: discrete) has testAccumulation function
@@ -46,6 +46,14 @@ Pass list-style-position: "inside" onto "outside"
Pass list-style-type (type: discrete) has testAccumulation function
Pass list-style-type: "square" onto "circle"
Pass list-style-type: "circle" onto "square"
+Pass math-depth (type: integer) has testAccumulation function
+Pass math-depth: integer
+Pass math-shift (type: discrete) has testAccumulation function
+Pass math-shift: "compact" onto "normal"
+Pass math-shift: "normal" onto "compact"
+Pass math-style (type: discrete) has testAccumulation function
+Pass math-style: "compact" onto "normal"
+Pass math-style: "normal" onto "compact"
Pass mask (type: discrete) has testAccumulation function
Pass mask: "url("http://localhost/test-2")" onto "url("http://localhost/test-1")"
Pass mask: "url("http://localhost/test-1")" onto "url("http://localhost/test-2")"
@@ -167,6 +175,12 @@ Pass position-try-order: "normal" onto "most-width"
Pass quotes (type: discrete) has testAccumulation function
Pass quotes: ""‘" "’" "“" "”"" onto ""“" "”" "‘" "’""
Pass quotes: ""“" "”" "‘" "’"" onto ""‘" "’" "“" "”""
+Pass resize (type: discrete) has testAccumulation function
+Pass resize: "horizontal" onto "both"
+Pass resize: "both" onto "horizontal"
+Pass scroll-behavior (type: discrete) has testAccumulation function
+Pass scroll-behavior: "smooth" onto "auto"
+Pass scroll-behavior: "auto" onto "smooth"
Pass scroll-snap-align (type: discrete) has testAccumulation function
Pass scroll-snap-align: "start" onto "none"
Pass scroll-snap-align: "none" onto "start"
diff --git a/Tests/LibWeb/Text/expected/wpt-import/web-animations/animation-model/animation-types/addition-per-property-002.txt b/Tests/LibWeb/Text/expected/wpt-import/web-animations/animation-model/animation-types/addition-per-property-002.txt
index 18f7ed3c0b7..41a541f7972 100644
--- a/Tests/LibWeb/Text/expected/wpt-import/web-animations/animation-model/animation-types/addition-per-property-002.txt
+++ b/Tests/LibWeb/Text/expected/wpt-import/web-animations/animation-model/animation-types/addition-per-property-002.txt
@@ -1,8 +1,8 @@
Harness status: OK
-Found 341 tests
+Found 355 tests
-331 Pass
+345 Pass
10 Fail
Pass Setup
Pass isolation (type: discrete) has testAddition function
@@ -46,6 +46,14 @@ Pass list-style-position: "inside" onto "outside"
Pass list-style-type (type: discrete) has testAddition function
Pass list-style-type: "square" onto "circle"
Pass list-style-type: "circle" onto "square"
+Pass math-depth (type: integer) has testAddition function
+Pass math-depth: integer
+Pass math-shift (type: discrete) has testAddition function
+Pass math-shift: "compact" onto "normal"
+Pass math-shift: "normal" onto "compact"
+Pass math-style (type: discrete) has testAddition function
+Pass math-style: "compact" onto "normal"
+Pass math-style: "normal" onto "compact"
Pass mask (type: discrete) has testAddition function
Pass mask: "url("http://localhost/test-2")" onto "url("http://localhost/test-1")"
Pass mask: "url("http://localhost/test-1")" onto "url("http://localhost/test-2")"
@@ -167,6 +175,12 @@ Pass position-try-order: "normal" onto "most-width"
Pass quotes (type: discrete) has testAddition function
Pass quotes: ""‘" "’" "“" "”"" onto ""“" "”" "‘" "’""
Pass quotes: ""“" "”" "‘" "’"" onto ""‘" "’" "“" "”""
+Pass resize (type: discrete) has testAddition function
+Pass resize: "horizontal" onto "both"
+Pass resize: "both" onto "horizontal"
+Pass scroll-behavior (type: discrete) has testAddition function
+Pass scroll-behavior: "smooth" onto "auto"
+Pass scroll-behavior: "auto" onto "smooth"
Pass scroll-snap-align (type: discrete) has testAddition function
Pass scroll-snap-align: "start" onto "none"
Pass scroll-snap-align: "none" onto "start"
diff --git a/Tests/LibWeb/Text/expected/wpt-import/web-animations/animation-model/animation-types/interpolation-per-property-002.txt b/Tests/LibWeb/Text/expected/wpt-import/web-animations/animation-model/animation-types/interpolation-per-property-002.txt
index a25ecda468a..d5d944f5852 100644
--- a/Tests/LibWeb/Text/expected/wpt-import/web-animations/animation-model/animation-types/interpolation-per-property-002.txt
+++ b/Tests/LibWeb/Text/expected/wpt-import/web-animations/animation-model/animation-types/interpolation-per-property-002.txt
@@ -1,8 +1,8 @@
Harness status: OK
-Found 423 tests
+Found 441 tests
-410 Pass
+428 Pass
13 Fail
Pass Setup
Pass isolation (type: discrete) has testInterpolation function
@@ -53,6 +53,16 @@ Pass list-style-type (type: discrete) has testInterpolation function
Pass list-style-type uses discrete animation when animating between "circle" and "square" with linear easing
Pass list-style-type uses discrete animation when animating between "circle" and "square" with effect easing
Pass list-style-type uses discrete animation when animating between "circle" and "square" with keyframe easing
+Pass math-depth (type: integer) has testInterpolation function
+Pass math-depth supports animating as an integer
+Pass math-shift (type: discrete) has testInterpolation function
+Pass math-shift uses discrete animation when animating between "normal" and "compact" with linear easing
+Pass math-shift uses discrete animation when animating between "normal" and "compact" with effect easing
+Pass math-shift uses discrete animation when animating between "normal" and "compact" with keyframe easing
+Pass math-style (type: discrete) has testInterpolation function
+Pass math-style uses discrete animation when animating between "normal" and "compact" with linear easing
+Pass math-style uses discrete animation when animating between "normal" and "compact" with effect easing
+Pass math-style uses discrete animation when animating between "normal" and "compact" with keyframe easing
Pass mask (type: discrete) has testInterpolation function
Pass mask uses discrete animation when animating between "url("http://localhost/test-1")" and "url("http://localhost/test-2")" with linear easing
Pass mask uses discrete animation when animating between "url("http://localhost/test-1")" and "url("http://localhost/test-2")" with effect easing
@@ -200,6 +210,14 @@ Pass quotes (type: discrete) has testInterpolation function
Pass quotes uses discrete animation when animating between ""“" "”" "‘" "’"" and ""‘" "’" "“" "”"" with linear easing
Pass quotes uses discrete animation when animating between ""“" "”" "‘" "’"" and ""‘" "’" "“" "”"" with effect easing
Pass quotes uses discrete animation when animating between ""“" "”" "‘" "’"" and ""‘" "’" "“" "”"" with keyframe easing
+Pass resize (type: discrete) has testInterpolation function
+Pass resize uses discrete animation when animating between "both" and "horizontal" with linear easing
+Pass resize uses discrete animation when animating between "both" and "horizontal" with effect easing
+Pass resize uses discrete animation when animating between "both" and "horizontal" with keyframe easing
+Pass scroll-behavior (type: discrete) has testInterpolation function
+Pass scroll-behavior uses discrete animation when animating between "auto" and "smooth" with linear easing
+Pass scroll-behavior uses discrete animation when animating between "auto" and "smooth" with effect easing
+Pass scroll-behavior uses discrete animation when animating between "auto" and "smooth" with keyframe easing
Pass scroll-snap-align (type: discrete) has testInterpolation function
Pass scroll-snap-align uses discrete animation when animating between "none" and "start" with linear easing
Pass scroll-snap-align uses discrete animation when animating between "none" and "start" with effect easing