Skip to content

Commit 86a09de

Browse files
Set animation requested flag for timeline animations (w3c#39)
1 parent ecc0722 commit 86a09de

File tree

2 files changed

+41
-27
lines changed

2 files changed

+41
-27
lines changed

index.bs

+12-6
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ either <dfn>frame-requested</dfn>, <dfn>frame-current</dfn>. It is initially set
401401
<a>frame-current</a>.
402402

403403
When a new element proxy is assigned to or removed from an <a>animator instance</a>, that
404-
<a>animator instance</a>'s<a>animation requested flag</a> should be set to <a>frame-requested</a>.
404+
<a>animator instance</a>'s <a>animation requested flag</a> should be set to <a>frame-requested</a>.
405405

406406
When the computed style for an element changes, the user agent <em>must</em> run the following steps:
407407

@@ -421,15 +421,21 @@ For each <a>element proxy</a> for that element, perform the following steps:
421421

422422
6. Let |inputProperties| be <a>animator input property list</a> of |slot|.
423423

424-
6. For each property in |inputProperties|, if the property’s computed value has changed,
424+
7. For each property in |inputProperties|, if the property’s computed value has changed,
425425
set the <a>animation requested flag</a> on the |animator| to <a>frame-requested</a>.
426426

427+
The timelines present in an animator's <a>animator timeline list</a> can also affect the
428+
<a>animation requested flag</a>:
427429

428-
[[#running-animators]] sets <a>animation requested flag</a> on animators to <a>frame-current</a>.
429-
430+
* If the string "document" is present in an animator's <a>animator timeline list</a>, then that
431+
animator's <a>animation requested flag</a> must be set to <a>frame-requested</a> at the start
432+
of each animation frame.
433+
* If the string "scroll" is present in an animator's <a>animator timeline list</a>, then when
434+
the scroll position of the nearest non-visible overflow ancestor to the animator’s
435+
<a>root element</a> changes, that animator's <a>animation requested flag</a> must be set to
436+
<a>frame-requested</a>.
430437

431-
Issue: Todo: Animators that have Timeline as an explicit input will need to request frame
432-
on every animation frame. Formulate this here.
438+
[[#running-animators]] sets <a>animation requested flag</a> on animators to <a>frame-current</a>.
433439

434440
Running Animators {#running-animators}
435441
======================================================

0 commit comments

Comments
 (0)