You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixing w3c#5202 and w3c#5211
Changes:
- Fix IDL to make source nullable.
- In CSS source will accept 'auto' and 'none' with none mapping to null.
- In JS, we now map missing 'source' to document scrolling element (i.e., auto behavior) and explicitly null 'source' to null.
- Correctly check null source when calculating offsets.
Other minor cleanups.
:: Creates a new {{ScrollTimeline}} object using the following procedure:
380
380
381
-
1. Let |timeline| be a new {{ScrollTimeline}} object.
381
+
1. Let |timeline| be a new {{ScrollTimeline}} object.
382
382
383
-
1. Let |source| be the result corresponding to the first matching condition from below.
383
+
1. Let |source| be the result corresponding to the first matching condition
384
+
from the following:
384
385
385
-
: If the |source| value of |options| is non-null,
386
-
:: Let |source| be |source|
386
+
<div class="switch">
387
387
388
-
: Otherwise (|source| is null),
389
-
:: Let |source| be the {{scrollingElement}} of the {{Document}}<a lt="document associated with a window">associated</a> with the {{Window}} that is the <a>current global object</a>.
388
+
: If the <code>source</code> member of |options| is missing,
389
+
:: The {{scrollingElement}} of the {{Document}}<a lt="document
390
+
associated with a window">associated</a> with the {{Window}} that is
391
+
the <a>current global object</a>.
390
392
391
-
Note: |source| may still be null after this step, e.g. if the {{Document}} has no {{scrollingElement}}.
393
+
: Otherwise,
394
+
:: The <code>source</code> member of |options|.
392
395
393
-
1. Set the {{ScrollTimeline/source}} of |timeline| to |source|.
396
+
</div>
394
397
395
-
1. Assign the {{ScrollTimeline/orientation}}, {{ScrollTimeline/start}}, {{ScrollTimeline/end}}, and {{ScrollTimeline/timeRange}} properties of |timeline| to the corresponding value from |options|.
398
+
1. Set the {{ScrollTimeline/source}}of |timeline| to |source|.
396
399
397
-
Issue(5202): The above steps need clarification, particularly with regards to
398
-
handling of null values for |source|.
400
+
1. Assign the {{ScrollTimeline/orientation}}, {{ScrollTimeline/start}},
401
+
{{ScrollTimeline/end}}, and {{ScrollTimeline/timeRange}} properties of
402
+
|timeline| to the corresponding value from |options|.
399
403
400
404
</div>
401
405
@@ -433,7 +437,7 @@ handling of null values for |source|.
433
437
{{start}} to {{end}}, to the [=effective time range=].
434
438
435
439
Issue(4862): We are working to remove the need for {{timeRange}} to be declared.
436
-
The most recent work on this involved introduction of the concept of
440
+
The most recent work on this involved introduction of the concept of
437
441
"progress-based animations" to web animations.
438
442
439
443
</div>
@@ -471,18 +475,26 @@ one the following values:
471
475
The procedure to <dfn>resolve a container-based offset</dfn> given
472
476
<var>offset</var> is as follows:
473
477
474
-
1. [=effective scroll offset=] is the scroll offset corresponding to the first
475
-
matching condition from the following:
478
+
1. If <em>any</em> of the following are true:
479
+
480
+
* {{source}} is null, or
481
+
* {{source}} does not currently have a [=CSS layout box=], or
482
+
* {{source}}'s layout box is not a [=scroll container=].
483
+
484
+
The [=effective scroll offset=] is null and abort remaining steps.
485
+
486
+
1. The [=effective scroll offset=] is the scroll offset corresponding to the
487
+
first matching condition from the following:
476
488
<div class="switch">
477
489
478
-
: <var>offset</var> is <code>auto</code>
479
-
:: Either the beginning or the ending of {{source}}'s scroll range
480
-
in {{orientation}} depending on whether the offset is {{start}} or {{end}}.
490
+
: <var>offset</var> is <code>auto</code>
491
+
:: Either the beginning or the ending of {{source}}'s scroll range in
492
+
{{orientation}} depending on whether the offset is {{start}} or {{end}}.
481
493
482
494
: <var>offset</var> is a <<length-percentage>>
483
-
:: The distance indicated by the value along {{source}}'s scroll range in{{orientation}} as
484
-
expressed by absolute length, a percentage, or a ''calc()'' expression that resolves to a
485
-
<<length>>.
495
+
:: The distance indicated by the value along {{source}}'s scroll range in
496
+
{{orientation}} as expressed by absolute length, a percentage, or a
497
+
''calc()'' expression that resolves to a <<length>>.
486
498
487
499
</div>
488
500
@@ -536,22 +548,27 @@ checked anywhere.
536
548
The procedure to <dfn>resolve an element-based offset</dfn> given
537
549
<var>offset</var> is as follows:
538
550
539
-
1. If {{source}} is null,
540
-
does not currently have a [=CSS layout box=],
541
-
or if its layout box is not a [=scroll container=],
542
-
abort the following steps
543
-
since then the [=effective scroll offset=] is null.
551
+
1. If <em>any</em> of the following are true:
552
+
553
+
* {{source}} is null, or
554
+
* {{source}} does not currently have a [=CSS layout box=], or
555
+
* {{source}}'s layout box is not a [=scroll container=].
556
+
557
+
The [=effective scroll offset=] is null and abort remaining steps.
544
558
545
559
1. Let <var>target</var> be <var>offset</var>'s {{target}}.
546
560
547
-
1. If <var>target</var> is null or
548
-
does not currently have a [=CSS layout box=],
549
-
abort the following steps
550
-
since then the [=effective scroll offset=] is null.
561
+
1. If <em>any</em> of the following are true:
562
+
563
+
* <var>target</var> is null, or
564
+
* <var>target</var> does not currently have a [=CSS layout box=].
565
+
566
+
The [=effective scroll offset=] is null and abort remaining steps.
567
+
551
568
552
569
1. If <var>target</var> 's nearest [=scroll container=] ancestor
553
570
is not {{source}}
554
-
abort the following steps
571
+
abort remaining steps
555
572
since the [=effective scroll offset=] is null.
556
573
557
574
1. Let <var>container box</var> be the {{source}}'s [=scrollport=].
@@ -809,7 +826,7 @@ the names are fully case-sensitive; two names are equal only if they are
809
826
codepoint-by-codepoint equal. The <<custom-ident>> additionally excludes the
810
827
none keyword.
811
828
812
-
Once specified, a scroll timeline may be associated with a CSS Animation
829
+
Once specified, a scroll timeline may be associated with a CSS Animation
813
830
[[CSS3-ANIMATIONS]] by using the 'animation-timeline' property.
814
831
815
832
The <<declaration-list>> inside of ''@scroll-timeline'' rule can only contain the
@@ -826,19 +843,32 @@ Issue(5167): This will likely change in the future.
826
843
<pre class='descdef'>
827
844
Name: source
828
845
For: @scroll-timeline
829
-
Value: selector(<<id-selector>>) | none
830
-
Initial: none
846
+
Value: selector(<<id-selector>>) | auto | none
847
+
Initial: auto
831
848
</pre>
832
849
833
-
'source' descriptor determines the scroll timeline's {{source}}. If specified as
834
-
a 'selector()' the scroll timeline's {{source}} is the [=scroll container=]
835
-
identified by the <<id-selector>>, otherwise if not specified or none then it is
836
-
the the {{scrollingElement}} of the {{Document}}<a lt="document associated with
837
-
a window">associated</a> with the {{Window}} that is the <a>current global
838
-
object</a>.
850
+
'source' descriptor determines the scroll timeline's {{source}}.
851
+
852
+
The value of {{source}} is the result corresponding to the first matching
853
+
condition from the following:
854
+
855
+
<div class="switch">
856
+
857
+
: If 'source' is a 'selector()'
858
+
:: The [=scroll container=] identified by the <<id-selector>>.
859
+
860
+
: If 'source' is <code>auto</code>
861
+
:: The {{scrollingElement}} of the {{Document}}<a lt="document associated with
862
+
a window">associated</a> with the {{Window}} that is the
0 commit comments