@@ -1800,6 +1800,16 @@ The procedure to <dfn>seamlessly update the playback rate</dfn> an
1800
1800
[=animation=] , |animation|, to |new playback rate| preserving its [=current
1801
1801
time=] is as follows:
1802
1802
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
+
1803
1813
1. Let |animation|'s [=pending playback rate=] be |new playback rate|.
1804
1814
1805
1815
1. Perform the steps corresponding to the first matching condition from below:
@@ -1814,13 +1824,12 @@ time=] is as follows:
1814
1824
playback rate=] when they run so there is no further action required in
1815
1825
this case.
1816
1826
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>
1818
1828
or <a lt="paused play state">paused</a> ,
1819
1829
1820
1830
:: [=Apply any pending playback rate=] on |animation|.
1821
1831
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> ,
1824
1833
1825
1834
:: 1. Let the |unconstrained current time| be the result of calculating
1826
1835
the [=current time=] of |animation| substituting an [=unresolved=]
@@ -1922,9 +1931,9 @@ condition from the following:
1922
1931
: For <var> animation</var> , <a>current time</a> is <a
1923
1932
lt=unresolved> resolved</a> and <em> either</em> of the following conditions
1924
1933
are true:
1925
- * [= playback rate=] > 0 and
1934
+ * |animation|'s [=effective playback rate=] > 0 and
1926
1935
<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
1928
1937
<a>current time</a> ≤ 0,
1929
1938
:: → <dfn lt="finished play state">finished</dfn>
1930
1939
: Otherwise,
0 commit comments