From 59820a4b8616f0571bb54bdb8a27d7594e5d6cde Mon Sep 17 00:00:00 2001 From: Olga Gerchikov Date: Sun, 10 May 2020 20:22:59 -0700 Subject: [PATCH 1/2] Fixed play animation procedure for scroll animations. --- web-animations-1/Overview.bs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/web-animations-1/Overview.bs b/web-animations-1/Overview.bs index 9368e625cdc..075c2829192 100644 --- a/web-animations-1/Overview.bs +++ b/web-animations-1/Overview.bs @@ -1201,6 +1201,11 @@ as CSS Animations [[CSS-ANIMATIONS-1]]. +1. If |performed seek| is true and |has finite timeline| is true, + + 1. Let |animation|'s [=hold time=] be unresolved. + 1. [=Apply any pending playback rate=] on |animation|. + 1. If animation has a pending play task or a pending pause task, From d89aad95724af6e245ec42d9e8e18dfa1b494712 Mon Sep 17 00:00:00 2001 From: Olga Gerchikov Date: Wed, 27 May 2020 16:11:35 -0700 Subject: [PATCH 2/2] Refactored play and pause procedures. --- web-animations-1/Overview.bs | 101 +++++++++++------------------------ 1 file changed, 32 insertions(+), 69 deletions(-) diff --git a/web-animations-1/Overview.bs b/web-animations-1/Overview.bs index 075c2829192..4cf2f402bed 100644 --- a/web-animations-1/Overview.bs +++ b/web-animations-1/Overview.bs @@ -1123,7 +1123,7 @@ as CSS Animations [[CSS-ANIMATIONS-1]]. animation has a pending pause task, and false otherwise. 1. Let has pending ready promise be a boolean flag that is initially false. -1. Let performed seek be a boolean flag that is initially false. +1. Let seek time be a time value that is initially unresolved. 1. Let has finite timeline be true if |animation| has an associated timeline that is not [=monotonically increasing=]. 1. Perform the steps corresponding to the first matching @@ -1139,18 +1139,7 @@ as CSS Animations [[CSS-ANIMATIONS-1]]. * current time < zero, or * current timeassociated effect end, - :: 1. Set performed seek to true. - 1. Update either animation’s start time or - hold time as follows: - -
- - : If |has finite timeline| is true, - :: Set animation's start time to zero. - : Otherwise, - :: Set animation's hold time to zero. - -
+ :: Set seek time to zero. : If |animation|'s [=effective playback rate=] < 0, the auto-rewind flag is true and either @@ -1166,45 +1155,32 @@ as CSS Animations [[CSS-ANIMATIONS-1]]. :: throw an "{{InvalidStateError}}" {{DOMException}} and abort these steps. : Otherwise, - :: 1. Set performed seek to true. - 1. Update either animation’s start time or - hold time as follows: - -
- - : If |has finite timeline| is true, - :: Set animation's start time to associated - effect end. - : Otherwise, - :: Set animation's hold time to associated - effect end. - -
+ :: Set seek time to |animation|'s associated effect end. : If |animation|'s [=effective playback rate=] = 0 and |animation|'s [=current time=] is [=unresolved=], - :: 1. Set performed seek to true. - 1. Update either animation’s start time or - hold time as follows: - -
+ :: Set seek time to zero. - : If |has finite timeline| is true, - :: Set animation's start time to zero. - : Otherwise, - :: Set animation's hold time to zero. +
- +1. If |seek time| is resolved, + +
-
+ : If |has finite timeline| is true, + :: 1. Set animation's start time to seek time. + 1. Let |animation|'s [=hold time=] be unresolved. + 1. [=Apply any pending playback rate=] on |animation|. + : Otherwise, + :: Set animation's hold time to seek time. -1. If |performed seek| is true and |has finite timeline| is true, + - 1. Let |animation|'s [=hold time=] be unresolved. - 1. [=Apply any pending playback rate=] on |animation|. +1. If animation's hold time is resolved, + let its [=start time=] be unresolved. 1. If animation has a pending play task or a pending pause task, @@ -1215,15 +1191,12 @@ as CSS Animations [[CSS-ANIMATIONS-1]]. 1. If the following four conditions are all satisfied: * |animation|'s [=hold time=] is [=unresolved=], and - * |performed seek| is false, and + * |seek time| is [=unresolved=], and * |aborted pause| is false, and * |animation| does not have a [=pending playback rate=], abort this procedure. -1. If animation's hold time is resolved, - let its [=start time=] be unresolved. - 1. If has pending ready promise is false, let animation's current ready promise be a new promise in the relevant Realm of animation. @@ -1348,6 +1321,7 @@ follows: 1. If animation has a pending pause task, abort these steps. 1. If the play state of animation is paused, abort these steps. +1. Let seek time be a time value that is initially unresolved. 1. Let has finite timeline be true if |animation| has an associated timeline that is not [=monotonically increasing=]. 1. If the animation's current time is unresolved, @@ -1356,18 +1330,7 @@ follows:
: If animation's [=playback rate=] is ≥ 0, - :: Update either animation’s start time or - hold time as follows: - -
- - : If |has finite timeline| is true, - :: Set animation's start time to zero. - : Otherwise, - :: Set animation's hold time to zero. - -
- + :: Set seek time to zero. : Otherwise, ::
@@ -1377,23 +1340,23 @@ follows: :: throw an "{{InvalidStateError}}" {{DOMException}} and abort these steps. : Otherwise, - :: Update either animation’s start time or - hold time as follows: + :: Set seek time to animation's associated effect + end. -
+
- : If |has finite timeline| is true, - :: let animation's start time be - associated effect end. - : Otherwise, - :: let animation's hold time be - associated effect end. +
-
+1. If |seek time| is resolved, - +
-
+ : If |has finite timeline| is true, + :: Set animation's start time to seek time. + : Otherwise, + :: Set animation's hold time to seek time. + + 1. Let has pending ready promise be a boolean flag that is initially false.