Skip to content

Commit c781949

Browse files
authored
Clarify checking for active animations
See discussion at w3c#7785
1 parent 6e1b86d commit c781949

File tree

1 file changed

+15
-16
lines changed

1 file changed

+15
-16
lines changed

css-view-transitions-1/Overview.bs

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -893,15 +893,21 @@ The {{ViewTransition/domUpdated}} [=getter steps=] are to return [=this's=] [=Vi
893893
To <dfn>update transition DOM</dfn> given a {{ViewTransition}} |transition|:
894894

895895
1. Let |document| be |transition|'s [=relevant global object's=] [=associated document=].
896-
897-
1. For each [=page-transition pseudo-elements=] associated with |transition|,
898-
check whether there is an active animation associated with this pseudo-element.
899-
900-
Issue: Define what active animation means here.
901-
902-
1. If no [=page-transition pseudo-elements=] has an active animation:
903-
904-
Issue: There needs to be a definition/link for "active animation".
896+
897+
1. Let |hasActiveAnimations| be a boolean, initially false. For each [=page-transition pseudo-elements=]
898+
associated with |transition|:
899+
900+
1. Let |element| be the [=page-transition pseudo-element=].
901+
902+
1. For each |animation| with [=effect target=] set to |element| and [=animation timeline=]
903+
of type [=document timeline=], set |hasActiveAnimations| to true if any of the following
904+
conditions is true:
905+
906+
1. |animation| is in <a lt="paused play state">paused</a> or <a lt="running play state">running</a> state.
907+
908+
1. [=pending-animation-event-queue=] has any events associated with |animation|.
909+
910+
1. If |hasActiveAnimations| is false:
905911

906912
1. Set |transition|'s [=ViewTransition/phase=] to "`done`".
907913

@@ -1022,13 +1028,6 @@ The {{ViewTransition/domUpdated}} [=getter steps=] are to return [=this's=] [=Vi
10221028

10231029

10241030
1. Set |transition|'s [=ViewTransition/phase=] to "`animating`".
1025-
1026-
Issue: How are keyframes scoped to user-agent origin? We could decide
1027-
scope based on whether `animation-name` in the computed style
1028-
came from a developer or UA stylesheet.
1029-
1030-
Issue: We should retarget the animation if computed properties for
1031-
incoming elements change.
10321031
</div>
10331032

10341033
## [=Create transition pseudo-elements=] ## {#create-transition-pseudo-elements-algorithm}

0 commit comments

Comments
 (0)