Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 37 additions & 20 deletions web-animations-1/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -2401,6 +2401,39 @@ An animation effect is <dfn>in effect</dfn> if its <a>active time</a>, as
calculated according to the procedure in [[#calculating-the-active-time]],
is <em>not</em> <a>unresolved</a>.

### Relevant animations ### {#relevant-animations-section}

We may define an [=animation=] as being [=relevant=]
based on the [=animation effect=] [=associated effect|associated=] with it.

An [=animation=] is <dfn for=animation export>relevant</dfn> if:

* Its [=associated effect=] is [=current=] <em>or</em> [=in effect=],
<em>and</em>
* Its [=replace state=] is <em>not</em> [=removed replace state|removed=].

<div algorithm="get relevant animations">

The <dfn export>relevant animations</dfn>
for an element or pseudo-element, |target|,
is the set of all [=animations=] that contain at least one [=animation effect=]
whose [=effect target=] is |target|.

</div>

<div algorithm="get relevant animations for a subtree">

The <dfn export>relevant animations for a subtree</dfn>
of an element, pseudo-element, [=document=], or [=shadow root=]—|target|—is
the set of all [=animations=] that contain at least one [=animation effect=]
whose [=effect target=] is an [=inclusive descendant=]
(or [=descendant=] if |target| is a [=document=] or [=shadow root=])
of |target|
or a [=pseudo-element=] of such a descendant.

</div>


Fill behavior {#fill-behavior}
----------------------------------------

Expand Down Expand Up @@ -5933,24 +5966,10 @@ animation.play();</pre>

: <dfn method for=Animatable lt="getAnimations(options)">
sequence&lt;Animation&gt; getAnimations(options)</dfn>
:: Returns the set of [=relevant=] {{Animation}} objects
that contain at least one <a>animation effect</a> whose
[=effect target=] is this object, or,
:: Returns the set of [=relevant animations=] for this object, or,
if an {{Animatable/getAnimations(options)/options}} parameter
is passed with {{GetAnimationsOptions/subtree}} set to true,
an [=inclusive descendant=] of this object or a [=pseudo-element=]
of such a descendant.

An [=animation=] is
<dfn lt="relevant animation" local-lt="relevant" export>relevant</dfn> if:

* Its [=associated effect=] is [=current=] <em>or</em> [=in effect=],
<em>and</em>
* Its [=replace state=] is <em>not</em> [=removed replace state|removed=].

For the purposes of this method
a [=pseudo-element=] is considered to be
a [=child=] of its [=originating element=].
returns the set of [=relevant animations for a subtree=] for this object.

The returned list is sorted using the composite order described
for the associated <a>animations</a> of effects in [[#the-effect-stack]].
Expand Down Expand Up @@ -6026,10 +6045,8 @@ partial interface mixin DocumentOrShadowRoot {

: <dfn method for=DocumentOrShadowRoot lt='getAnimations()'>
sequence&lt;Animation&gt; getAnimations()</dfn>
:: Returns the set of [=relevant=] {{Animation}} objects
that have an associated <a>associated effect</a>
whose <a>target element</a> is a <a>descendant</a> of
the [=document=] or [=shadow root=]
:: Returns the set of [=relevant animations for a subtree=]
for the [=document=] or [=shadow root=]
on which this method is called.

The returned list is sorted using the composite order described
Expand Down