Skip to content

Commit

Permalink
Specify the behaviour when the scrollSource does not have a CSS layou…
Browse files Browse the repository at this point in the history
…t box. Fixes issue #3.
  • Loading branch information
theres-waldo committed Mar 22, 2017
1 parent e43fe25 commit ba92cbb
Show file tree
Hide file tree
Showing 2 changed files with 171 additions and 131 deletions.
13 changes: 9 additions & 4 deletions Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ urlPrefix: https://w3c.github.io/web-animations/; type: dfn; spec: web-animation
text: start delay
text: target effect end
text: timeline
urlPrefix: https://www.w3.org/TR/cssom-view-1/; type: dfn; spec: cssom-view-1
text: CSS layout box
</pre>

# Introduction # {#intro}
Expand Down Expand Up @@ -496,18 +498,21 @@ The <dfn>effective time range</dfn> of a {{ScrollTimeline}} is calculated as fol
The [=current time=] of a {{ScrollTimeline}} is calculated
as follows:

1. Let <var>current scroll offset</var> be the current scroll offset of {{scrollSource}}
1. If {{scrollSource}} does not currently have a [=CSS layout box=], return an unresolved
time value.

2. Otherwise, let <var>current scroll offset</var> be the current scroll offset of {{scrollSource}}
in the direction specified by {{orientation}}.

2. If <var>current scroll offset</var> is less than {{startScrollOffset}}, return an unresolved
3. If <var>current scroll offset</var> is less than {{startScrollOffset}}, return an unresolved
time value if {{fill}} is <code>none</code> or <code>forwards</code>,
or 0 otherwise.

3. If <var>current scroll offset</var> is greater than or equal to {{endScrollOffset}},
4. If <var>current scroll offset</var> is greater than or equal to {{endScrollOffset}},
return an unresolved time value if {{fill}} is <code>none</code> or
<code>backwards</code>, or the [=effective time range=] otherwise.

4. Return the result of evaluating the following expression:
5. Return the result of evaluating the following expression:

<blockquote>
<code>(<var>current scroll offset</var> - {{startScrollOffset}}) / ({{endScrollOffset}} - {{startScrollOffset}}) &times; [=effective time range=]</code>
Expand Down
Loading

0 comments on commit ba92cbb

Please sign in to comment.