diff --git a/web-animations-1/Overview.bs b/web-animations-1/Overview.bs index bcd097fcbee..61e010164d2 100644 --- a/web-animations-1/Overview.bs +++ b/web-animations-1/Overview.bs @@ -2401,6 +2401,39 @@ An animation effect is in effect if its active time, as calculated according to the procedure in [[#calculating-the-active-time]], is not unresolved. +### 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 relevant if: + +* Its [=associated effect=] is [=current=] or [=in effect=], + and +* Its [=replace state=] is not [=removed replace state|removed=]. + +
+ +The relevant animations +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|. + +
+ +
+ +The relevant animations for a subtree +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. + +
+ + Fill behavior {#fill-behavior} ---------------------------------------- @@ -5933,24 +5966,10 @@ animation.play(); : sequence<Animation> getAnimations(options) -:: Returns the set of [=relevant=] {{Animation}} objects - that contain at least one animation effect 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 - relevant if: - - * Its [=associated effect=] is [=current=] or [=in effect=], - and - * Its [=replace state=] is not [=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 animations of effects in [[#the-effect-stack]]. @@ -6026,10 +6045,8 @@ partial interface mixin DocumentOrShadowRoot { : sequence<Animation> getAnimations() -:: Returns the set of [=relevant=] {{Animation}} objects - that have an associated associated effect - whose target element is a descendant 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