@@ -1800,6 +1800,16 @@ The procedure to <dfn>seamlessly update the playback rate</dfn> an
18001800[=animation=] , |animation|, to |new playback rate| preserving its [=current
18011801time=] is as follows:
18021802
1803+ 1. Let |previous play state| be |animation|'s [=play state=] .
1804+
1805+ Note: It is necessary to record the play state
1806+ before updating |animation|'s [=effective playback rate=] since,
1807+ in the following logic,
1808+ we want to immediately apply the [=pending playback rate=] of |animation|
1809+ if it is <em> currently</em> <a lt="finished play state">finished</a>
1810+ regardless of whether or not it will still be finished after we
1811+ apply the [=pending playback rate=] .
1812+
180318131. Let |animation|'s [=pending playback rate=] be |new playback rate|.
18041814
180518151. Perform the steps corresponding to the first matching condition from below:
@@ -1814,13 +1824,12 @@ time=] is as follows:
18141824 playback rate=] when they run so there is no further action required in
18151825 this case.
18161826
1817- : If |animation|'s [= play state=] is <a lt="idle play state">idle</a>
1827+ : If |previous play state| is <a lt="idle play state">idle</a>
18181828 or <a lt="paused play state">paused</a> ,
18191829
18201830 :: [=Apply any pending playback rate=] on |animation|.
18211831
1822- : If |animation|'s [=play state=] is <a lt="finished play
1823- state">finished</a> ,
1832+ : If |previous play state| is <a lt="finished play state">finished</a> ,
18241833
18251834 :: 1. Let the |unconstrained current time| be the result of calculating
18261835 the [=current time=] of |animation| substituting an [=unresolved=]
@@ -1922,9 +1931,9 @@ condition from the following:
19221931: For <var> animation</var> , <a>current time</a> is <a
19231932 lt=unresolved> resolved</a> and <em> either</em> of the following conditions
19241933 are true:
1925- * [= playback rate=] > 0 and
1934+ * |animation|'s [=effective playback rate=] > 0 and
19261935 <a>current time</a> ≥ <a>target effect end</a> ; <em> or</em>
1927- * [= playback rate=] < 0 and
1936+ * |animation|'s [=effective playback rate=] < 0 and
19281937 <a>current time</a> ≤ 0,
19291938:: → <dfn lt="finished play state">finished</dfn>
19301939: Otherwise,
0 commit comments