8000 [scroll-animations-1][web-animations-2] Deferred start time by kevers-google · Pull Request #9181 · w3c/csswg-drafts · GitHub
[go: up one dir, main page]

Skip to content
Merged
Changes from 1 commit
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
Next Next commit
Checkpoint
  • Loading branch information
kevers-google committed Aug 8, 2023
commit 5cdffe601d254ff9b295910236ae70ae8e26266e
81 changes: 51 additions & 30 deletions web-animations-2/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,34 @@ dl.switch > [data-md] > p {
dl.switch > dt > ul > li {
text-indent: 0;
}

/* Override settings in base.css */
/* Inconsistencies in the handling of dl.switch. Sometimes it is expanded to
div.switch > dl, while other times it remains dl.switch. The inconsistency
probably suggests an indentation problem.
TODO: Remove dl.switch > dt rule once the inconsistencies are addressed. */
dl.switch > dt {
/* "display: list-item" in base.css, which triggers an increase in
numbering resulting in gaps in the numbered list items. */
/* display: block !important; */
/* text-indent: 0 !important; */
}

/*
div.switch > dl > dt:before,
dl.switch > dt:before {
content: '\21AA';
padding: 0 0.5em 0 0;
display: inline-block;
width: 1em;
text-align: right;
line-height: 0.5em;
}

div.switch > dl > dt > p {
display: inline;
}
*/
</style>

<pre class='metadata'>
Expand All @@ -59,11 +87,11 @@ Work Status: Exploring
Shortname: web-animations
ED: https://drafts.csswg.org/web-animations-2/
TR: https://www.w3.org/TR/web-animations-2/
Version history: https://github.com/w3c/csswg-drafts/commits/master/web-animations-2
Version history: https://github.com/w3c/csswg-drafts/commits/main/web-animations-2
Level: 2

Group: csswg
!Participate: <a href="https://github.com/w3c/csswg-drafts/tree/master/web-animations-2">Fix the text through GitHub</a>
!Participate: <a href="https://github.com/w3c/csswg-drafts/tree/main/web-animations-2">Fix the text through GitHub</a>
!Participate: Join the &lsquo;waapi&rsquo; channel on the <a href="https://damp-lake-50659.herokuapp.com/">Animation at Work</a> slack
!Participate: IRC: <a href="ircs://irc.w3.org:6667/webanimations">#webanimations</a> on W3C's IRC
Repository: w3c/csswg-drafts
Expand Down Expand Up @@ -546,8 +574,7 @@ is as follows:
1. Let <var>previous current time</var> be <var>animation</var>'s
[=animation/current time=].

Note: This is the [=animation/current time=] after applying the changes from the
previous step which may cause the [=animation/current time=] to become
Note: This is the [=animation/current time=] after applying the changes from the previous step which may cause the [=animation/current time=] to become
<a>unresolved</a>.

1. [=Apply any pending playback rate=] on |animation|.
Expand Down Expand Up @@ -582,6 +609,7 @@ is as follows:
<var>animation</var> with the <var>did seek</var> flag set to true, and
the <var>synchronously notify</var> flag set to false.


<h4 id='playing-an-animation-section'>Playing an animation</h4>

The procedure to <dfn>play an animation</dfn>, <var>animation</var>, given
Expand All @@ -595,34 +623,31 @@ as CSS Animations [[CSS-ANIMATIONS-1]].
<var>animation</var> has a <a>pending pause task</a>, and false otherwise.
1. Let <var>has pending ready promise</var> be a boolean flag that is
initially false.
1. Let <var>seek time</var> be a <a>time value</a> that is initially <a>unresolved</a>.
1. Let <var>has finite timeline</var> be true if |animation| has an associated
<a>timeline</a> that is not
[=monotonically increasing timeline|monotonically increasing=].
1. Let <var>previous current time</var> be the |animation|'s
[=animation/current time=]
1. If |reset current time on resume| is set:

* Set <var>previous current time</var> to unresolved.
* Set the |reset current time on resume| flag to false.

1. Let <var>enable seek</var> be true if the <var>auto-rewind</var> flag is
true and <var>has finite timeline</var> is false. Otherwise, initialize to
false.
1. Perform the steps corresponding to the <em>first</em> matching
condition from the following, if any:

<dl class="switch">
<div class=switch>

: If |animation|'s [=effective playback rate=] &gt; 0,
the <var>auto-rewind</var> flag is true and <em>either</em>
<var>enable seek</var> is true and <em>either</em>
<var>animation</var>'s:

* <var>previous current time</var> is <a>unresolved</a>, or
* <var>previous current time</var> &lt; zero, or
* <var>previous current time</var> &ge; <a>associated effect end</a>,

:: Set <var>seek time</var> to zero.
:: Set the |animation|'s <a>hold time</a> to zero.

: If |animation|'s [=effective playback rate=] &lt; 0,
the <var>auto-rewind</var> flag is true and <em>either</em>
<var>enable seek</var> is true and <em>either</em>
<var>animation</var>'s:

* <var>previous current time</var> is <a>unresolved</a>, or
Expand All @@ -635,31 +660,27 @@ as CSS Animations [[CSS-ANIMATIONS-1]].
:: <a>throw</a> an "{{InvalidStateError}}" {{DOMException}} and
abort these steps.
: Otherwise,
:: Set <var>seek time</var> to |animation|'s <a>associated effect end</a>.
:: Set the |animation|'s <a>hold time</a> to the
|animation|'s <a>associated effect end</a>.

</dl>

: If |animation|'s [=effective playback rate=] = 0 and |animation|'s
[=animation/current time=] is [=unresolved=],

:: Set <var>seek time</var> to zero.

</dl>

1. If |seek time| is <a lt=unresolved>resolved</a>,
:: Set the |animation|'s <a>hold time</a> to zero.

<dl class="switch">
</div>

: If |has finite timeline| is true,
:: 1. Set <var>animation</var>'s [=animation/start time=] to
<var>seek time</var>.
1. Let |animation|'s [=hold time=] be <a>unresolved</a>.
1. [=Apply any pending playback rate=] on |animation|.
1. If |has finite timeline| and the |auto-rewind| flag is true:
* Set the flag |auto align start time| to true.
* Set the |animation|'s <a>hold time</a> to the |animation|'s
[=animation/current time=]

: Otherwise,
:: 1. Set <var>animation</var>'s <a>hold time</a> to
<var>seek time</var>.
</dl>
Note: If play is called for a CSS animation during style update,
the |animation|'s [=start time=] cannot be reliably calculated until post
layout since the start time is to align with the start or end of the animation
range (depending on the [=playback rate=]).

1. If <var>animation</var>'s <a>hold time</a> is <a lt=unresolved>resolved</a>,
let its [=animation/start time=] be <a>unresolved</a>.
Expand Down
0