Skip to content

Commit 666f8dd

Browse files
committed
[web-animations-1] Export and namespace animation play states
Fixes w3c#8003.
1 parent 0122454 commit 666f8dd

File tree

1 file changed

+36
-36
lines changed

1 file changed

+36
-36
lines changed

web-animations-1/Overview.bs

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1106,7 +1106,7 @@ previously did not have a pending task, or when the animation is canceled (see
11061106
animation when the <a>Promise object</a> is resolved.
11071107

11081108
For example, in the following code fragment, the state of the animation
1109-
will be <a lt="running play state">running</a> when the
1109+
will be [=play state/running=] when the
11101110
<a>current ready promise</a> is resolved.
11111111
This is because the <code>play</code> operation occurs while a <a>pending
11121112
play task</a> is still queued and hence the <a>current ready promise</a>
@@ -1332,8 +1332,8 @@ The procedure to <dfn>pause an animation</dfn>, <var>animation</var>, is as
13321332
follows:
13331333

13341334
1. If <var>animation</var> has a <a>pending pause task</a>, abort these steps.
1335-
1. If the <a>play state</a> of <var>animation</var> is <a
1336-
lt="paused play state">paused</a>, abort these steps.
1335+
1. If the <a>play state</a> of <var>animation</var> is [=play state/paused=],
1336+
abort these steps.
13371337
1. Let <var>seek time</var> be a <a>time value</a> that is initially <a>unresolved</a>.
13381338
1. Let <var>has finite timeline</var> be true if |animation| has an associated
13391339
<a>timeline</a> that is not [=monotonically increasing=].
@@ -1402,10 +1402,10 @@ follows:
14021402
[=playback rate=]</code>.
14031403

14041404
Note: The <a>hold time</a> might be already set if the animation
1405-
is <a lt="finished play state">finished</a>, or if the animation
1406-
has a <a>pending play task</a>.
1405+
is [=play state/finished=],
1406+
or if the animation has a <a>pending play task</a>.
14071407
In either case we want to preserve the <a>hold time</a> as we
1408-
enter the <a lt="paused play state">paused</a> state.
1408+
enter the [=play state/paused=] state.
14091409

14101410
1. [=Apply any pending playback rate=] on |animation|.
14111411

@@ -1509,7 +1509,7 @@ until it reaches zero.
15091509

15101510
A running animation that has reached this boundary (or overshot it) and has a
15111511
<a lt="unresolved">resolved</a> [=start time=]
1512-
is said to be <a lt="finished play state">finished</a>.
1512+
is said to be [=play state/finished=].
15131513

15141514
The crossing of this boundary is checked on each modification to the
15151515
animation object using the procedure to <a>update an animation's finished
@@ -1599,16 +1599,16 @@ follows:
15991599
1. Set the <a>previous current time</a> of <var>animation</var> be the
16001600
result of calculating its [=animation/current time=].
16011601
1. Let <var>current finished state</var> be true if the <a>play
1602-
state</a> of <var>animation</var> is
1603-
<a lt="finished play state">finished</a>.
1602+
state</a> of <var>animation</var> is [=play state/finished=].
16041603
Otherwise, let it be false.
16051604
1. If <var>current finished state</var> is true and the <a>current finished
16061605
promise</a> is not yet resolved, perform the following steps:
16071606

16081607
1. Let <dfn>finish notification steps</dfn> refer to the following
16091608
procedure:
1610-
1. If <var>animation</var>'s <a>play state</a> is not equal to <a
1611-
lt="finished play state">finished</a>, abort these steps.
1609+
1. If <var>animation</var>'s <a>play state</a> is not equal to
1610+
[=play state/finished=],
1611+
abort these steps.
16121612
1. <a lt="resolve a promise">Resolve</a> <var>animation</var>'s
16131613
<a>current finished promise</a> object with
16141614
<var>animation</var>.
@@ -1654,7 +1654,7 @@ follows:
16541654

16551655
Typically, notification about the finished state of an animation is
16561656
performed asynchronously. This allows for the animation to temporarily
1657-
enter the <a lt="finished play state">finished state</a> without
1657+
enter the <a>finished play state</a> without
16581658
triggering events to be fired or promises to be resolved.
16591659

16601660
For example, in the following code fragment, <code>animation</code> temporarily
@@ -1737,8 +1737,8 @@ for <var>animation</var> defined below:
17371737
1. Let the <a>hold time</a> be <a>unresolved</a>.
17381738

17391739
<div class="note">Typically the <a>hold time</a> will already be
1740-
unresolved except in the case when the animation was previously <a
1741-
lt="idle play state">idle</a>.</div>
1740+
unresolved except in the case when the animation was previously
1741+
[=play state/idle=].</div>
17421742

17431743
1. Cancel the <a>pending pause task</a>.
17441744

@@ -1764,7 +1764,7 @@ The procedure to <dfn>cancel an animation</dfn> for <var>animation</var> is
17641764
as follows:
17651765

17661766
1. If <var>animation</var>'s <a>play state</a> is <em>not</em>
1767-
<a lt="idle play state">idle</a>, perform the following steps:
1767+
[=play state/idle=], perform the following steps:
17681768
1. Run the procedure to <a>reset an animation's pending tasks</a> on
17691769
<var>animation</var>.
17701770
1. <a lt="reject a Promise">Reject</a> the <a>current finished promise</a>
@@ -1830,7 +1830,7 @@ The [=playback rate=] is initially 1.
18301830

18311831
Setting an animation's [=playback rate=]
18321832
to zero effectively pauses the animation (however, the <a>play state</a>
1833-
does not necessarily become <a lt="paused play state">paused</a>).
1833+
does not necessarily become [=play state/paused=]).
18341834

18351835
#### Setting the playback rate of an animation #### {#setting-the-playback-rate-of-an-animation}
18361836

@@ -1888,7 +1888,7 @@ The procedure to <dfn>seamlessly update the playback rate</dfn> an
18881888
before updating |animation|'s [=effective playback rate=] since,
18891889
in the following logic,
18901890
we want to immediately apply the [=pending playback rate=] of |animation|
1891-
if it is <em>currently</em> <a lt="finished play state">finished</a>
1891+
if it is <em>currently</em> [=play state/finished=]
18921892
regardless of whether or not it will still be finished after we
18931893
apply the [=pending playback rate=].
18941894

@@ -1907,16 +1907,16 @@ The procedure to <dfn>seamlessly update the playback rate</dfn> an
19071907
this case.
19081908

19091909
: If |previous play state| is <a lt="idle play state">idle</a>
1910-
or <a lt="paused play state">paused</a>, or
1910+
or [=play state/paused=], or
19111911
|animation|'s [=animation/current time=] is [=unresolved=],
19121912

19131913
:: [=Apply any pending playback rate=] on |animation|.
19141914

19151915
Note: the second condition above is required so that if we have a
1916-
[=running play state|running=] animation with an unresolved current time
1916+
[=play state/running=] animation with an unresolved current time
19171917
and no pending play task, we do not attempt to play it below.
19181918

1919-
: If |previous play state| is <a lt="finished play state">finished</a>,
1919+
: If |previous play state| is [=play state/finished=],
19201920

19211921
:: 1. Let the |unconstrained current time| be the result of calculating
19221922
the [=animation/current time=] of |animation|
@@ -1976,25 +1976,25 @@ The procedure to <dfn>reverse an animation</dfn> of <a>animation</a>
19761976
### Play states ### {#play-states}
19771977

19781978
An <a>animation</a> may be described as being in one of the following
1979-
<dfn lt="play state">play states</dfn> for each of which, a
1980-
non-normative description is also provided:
1979+
<dfn lt="play state" export for="animation">play states</dfn>
1980+
for each of which, a non-normative description is also provided:
19811981

19821982
<div class=informative-bg>
19831983

1984-
: <a lt="idle play state">idle</a>
1984+
: [=play state/idle=]
19851985
:: The [=animation/current time=] of the animation is <a>unresolved</a> and
19861986
the <a>start time</a> of the animation is <a>unresolved</a> and
19871987
there are no pending tasks.
19881988
In this state the animation has no effect.
1989-
: <a lt="running play state">running</a>
1989+
: [=play state/running=]
19901990
:: The animation has a resolved [=animation/current time=] that changes on each
19911991
<a>animation frame</a> (provided the [=playback rate=] is not zero
19921992
and the <a>timeline</a> is [=inactive timeline|active=] and
19931993
[=monotonically increasing=]).
1994-
: <a lt="paused play state">paused</a>
1994+
: [=play state/paused=]
19951995
:: The animation has been suspended and the [=animation/current time=]
19961996
is no longer changing.
1997-
: <a lt="finished play state">finished</a>
1997+
: [=play state/finished=]
19981998
:: The animation has reached the natural boundary of its playback range
19991999
and the [=animation/current time=] is no longer updating.
20002000

@@ -2014,13 +2014,13 @@ condition from the following:
20142014
<em>and</em>
20152015
* <var>animation</var> does <em>not</em> have <em>either</em>
20162016
a <a>pending play task</a> <em>or</em> a <a>pending pause task</a>,
2017-
:: &rarr; <dfn lt="idle play state">idle</dfn>
2017+
:: &rarr; <dfn for="play state" local-lt="idle play state" export>idle</dfn>
20182018
: <em>Either</em> of the following conditions are true:
20192019
* <var>animation</var> has a <a>pending pause task</a>, <em>or</em>
20202020
* <em>both</em> the [=start time=] of
20212021
<var>animation</var> is <a>unresolved</a> <em>and</em> it does
20222022
<em>not</em> have a <a>pending play task</a>,
2023-
:: &rarr; <dfn lt="paused play state">paused</dfn>
2023+
:: &rarr; <dfn for="play state" local-lt="paused play state" export>paused</dfn>
20242024
: For <var>animation</var>, [=animation/current time=] is <a
20252025
lt=unresolved>resolved</a> and <em>either</em> of the following conditions
20262026
are true:
@@ -2029,9 +2029,9 @@ condition from the following:
20292029
<em>or</em>
20302030
* |animation|'s [=effective playback rate=] &lt; 0 and
20312031
[=animation/current time=] &le; 0,
2032-
:: &rarr; <dfn lt="finished play state">finished</dfn>
2032+
:: &rarr; <dfn for="play state" local-lt="finished play state" export>finished</dfn>
20332033
: Otherwise,
2034-
:: &rarr; <dfn lt="running play state">running</dfn>
2034+
:: &rarr; <dfn for="play state" local-lt="running play state" export>running</dfn>
20352035

20362036
</div>
20372037

@@ -2041,8 +2041,8 @@ Note that the <a>paused play state</a> effectively
20412041
"wins" over the <a>finished play state</a>.
20422042

20432043
However, an animation that is paused outside of its natural playback range can
2044-
be converted from a <a lt="paused play state">paused</a>
2045-
animation into a <a lt="finished play state">finished</a> animation
2044+
be converted from a [=play state/paused=] animation
2045+
into a [=play state/finished=] animation
20462046
without restarting by setting the [=start time=] such as below:
20472047

20482048
<div class='example'><pre class='lang-javascript'>
@@ -2384,7 +2384,7 @@ of the following conditions are met:
23842384

23852385
1. the <a>animation effect</a> is in the [=animation effect/active phase=], and
23862386
2. the <a>animation effect</a> is <a>associated with an animation</a> that is not
2387-
<a lt="finished play state">finished</a>.
2387+
[=play state/finished=].
23882388

23892389
An <a>animation effect</a> is <dfn>current</dfn> if <em>any</em>
23902390
of the following conditions are true:
@@ -3925,7 +3925,7 @@ if <em>all</em> of the following conditions are true:
39253925
That is, it is <em>not</em>
39263926
a CSS animation with an [=owning element (animation)|owning element=],
39273927
nor a CSS transition with an [=owning element (transition)|owning element=].
3928-
* The [=animation=]'s [=play state=] is [=finished play state|finished=].
3928+
* The [=animation=]'s [=play state=] is [=play state/finished=].
39293929
* The [=animation=]'s [=replace state=] is <em>not</em>
39303930
[=removed replace state|removed=].
39313931
* The [=animation=] is associated with a [=monotonically increasing=]
@@ -6089,8 +6089,8 @@ dictionary AnimationPlaybackEventInit : EventInit {
60896089
: <dfn attribute for=AnimationPlaybackEvent>currentTime</dfn>
60906090
:: The [=animation/current time=] of the [=animation=] that
60916091
generated the event at the moment the event as queued.
6092-
This will be <code class=esvalue>null</code> if the [=animation=] was <a
6093-
lt="idle play state">idle</a> at the time the event was generated.
6092+
This will be <code class=esvalue>null</code> if the [=animation=] was
6093+
[=play state/idle=] at the time the event was generated.
60946094
: <dfn attribute for=AnimationPlaybackEvent>timelineTime</dfn>
60956095
:: The [=time value=] of the [=timeline=] with which the [=animation=] that
60966096
generated the event is associated at the moment the event was queued.

0 commit comments

Comments
 (0)