Skip to content

Commit ba92cbb

Browse files
committed
Specify the behaviour when the scrollSource does not have a CSS layout box. Fixes issue #3.
1 parent e43fe25 commit ba92cbb

File tree

2 files changed

+171
-131
lines changed

2 files changed

+171
-131
lines changed

Overview.bs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ urlPrefix: https://w3c.github.io/web-animations/; type: dfn; spec: web-animation
2424
text: start delay
2525
text: target effect end
2626
text: timeline
27+
urlPrefix: https://www.w3.org/TR/cssom-view-1/; type: dfn; spec: cssom-view-1
28+
text: CSS layout box
2729
</pre>
2830

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

499-
1. Let <var>current scroll offset</var> be the current scroll offset of {{scrollSource}}
501+
1. If {{scrollSource}} does not currently have a [=CSS layout box=], return an unresolved
502+
time value.
503+
504+
2. Otherwise, let <var>current scroll offset</var> be the current scroll offset of {{scrollSource}}
500505
in the direction specified by {{orientation}}.
501506

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

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

510-
4. Return the result of evaluating the following expression:
515+
5. Return the result of evaluating the following expression:
511516

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

0 commit comments

Comments
 (0)