From 268250ba6d4c1ce72b87d0cef576dd09bc7f765a Mon Sep 17 00:00:00 2001 From: Joey Arhar Date: Tue, 7 Mar 2023 10:05:22 -0800 Subject: [PATCH] Reland #2 "Implement CSSTransitionDiscrete which enables transitions on discrete properties." Original patch: https://crrev.com/c/4219315 Revert 1: https://crrev.com/c/4305045 Reland 1: https://crrev.com/c/4304846 Revert 2: https://crrev.com/c/4307944 Despite the most relaxed value in TestExpectations for discrete-no-interpolation.tentative.html, some bots are still breaking for reasons I don't understand. I am going to remove the test completely until it stops crashing or failing. This patch will still be useful despite the lack of tests because other people are doing prototyping work that builds on this change. Bug: 1399631, 1413556 Change-Id: Ic08f16d6436e37acc8947a94ca699c1735fe221f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4308075 Commit-Queue: Joey Arhar Reviewed-by: Mason Freed Auto-Submit: Joey Arhar Cr-Commit-Position: refs/heads/main@{#1114026} --- .../all-with-discrete.tentative.html | 51 +++++++++++++++++++ .../display-none-no-animations.html | 28 ++++++++++ .../animation/offset-interpolation.html | 12 ++--- css/support/interpolation-testcommon.js | 2 +- 4 files changed, 86 insertions(+), 7 deletions(-) create mode 100644 css/css-transitions/all-with-discrete.tentative.html create mode 100644 css/css-transitions/display-none-no-animations.html diff --git a/css/css-transitions/all-with-discrete.tentative.html b/css/css-transitions/all-with-discrete.tentative.html new file mode 100644 index 00000000000000..f12c14e4c55285 --- /dev/null +++ b/css/css-transitions/all-with-discrete.tentative.html @@ -0,0 +1,51 @@ + + + + + + +
hello
+
hello
+ + + + diff --git a/css/css-transitions/display-none-no-animations.html b/css/css-transitions/display-none-no-animations.html new file mode 100644 index 00000000000000..32535baf9c7b1a --- /dev/null +++ b/css/css-transitions/display-none-no-animations.html @@ -0,0 +1,28 @@ + + + + + +
target
+ + + diff --git a/css/motion/animation/offset-interpolation.html b/css/motion/animation/offset-interpolation.html index 2ee011bd77a975..9c3747185dc830 100644 --- a/css/motion/animation/offset-interpolation.html +++ b/css/motion/animation/offset-interpolation.html @@ -15,9 +15,9 @@ to: 'path("M0 300H 700 Z") 600px 900deg', method: 'CSS Transitions', }, [ - {at: -0.3, expect: 'path("M0 300H 700 Z") 470px 770deg'}, - {at: 0, expect: 'path("M0 300H 700 Z") 500px 800deg'}, - {at: 0.3, expect: 'path("M0 300H 700 Z") 530px 830deg'}, + {at: -0.3, expect: 'path("M0 200H 700") 470px 770deg'}, + {at: 0, expect: 'path("M0 200H 700") 500px 800deg'}, + {at: 0.3, expect: 'path("M0 200H 700") 530px 830deg'}, {at: 0.6, expect: 'path("M0 300H 700 Z") 560px 860deg'}, {at: 1, expect: 'path("M0 300H 700 Z") 600px 900deg'}, {at: 1.5, expect: 'path("M0 300H 700 Z") 650px 950deg'}, @@ -29,9 +29,9 @@ to: 'path("M0 0H 300") 600px 0deg', method: 'CSS Transitions', }, [ - {at: -0.3, expect: 'path("M0 0H 170") 470px 0deg'}, - {at: 0, expect: 'path("M0 0H 200") 500px 0deg'}, - {at: 0.3, expect: 'path("M0 0H 230") 530px 0deg'}, + {at: -0.3, expect: 'path("M0 0H 170") 470px auto 0deg'}, + {at: 0, expect: 'path("M0 0H 200") 500px auto 0deg'}, + {at: 0.3, expect: 'path("M0 0H 230") 530px auto 0deg'}, {at: 0.6, expect: 'path("M0 0H 260") 560px 0deg'}, {at: 1, expect: 'path("M0 0H 300") 600px 0deg'}, {at: 1.5, expect: 'path("M0 0H 350") 650px 0deg'}, diff --git a/css/support/interpolation-testcommon.js b/css/support/interpolation-testcommon.js index aa8239ae928654..283a2d8aaba888 100644 --- a/css/support/interpolation-testcommon.js +++ b/css/support/interpolation-testcommon.js @@ -56,7 +56,7 @@ target.style.setProperty(property, isNeutralKeyframe(from) ? '' : from); }, nonInterpolationExpectations: function(from, to) { - return expectFlip(from, to, -Infinity); + return expectFlip(from, to, 0.5); }, notAnimatableExpectations: function(from, to, underlying) { return expectFlip(from, to, -Infinity);