@@ -427,6 +427,7 @@ partial interface DocumentTimeline {
427427
428428<pre class="idl">
429429enum ScrollDirection {
430+ "auto",
430431 "block",
431432 "inline",
432433 "horizontal",
@@ -437,27 +438,28 @@ enum ScrollDirection {
437438The {{ScrollDirection}} enumeration specifies a direction of scroll of a
438439scrollable element.
439440
441+ : <code> auto</code>
442+ :: If only one direction is scrollable, selects that direction.
443+ Otherwise selects the direction along the [=block axis=] .
444+
440445: <code> block</code>
441- :: Selects the direction along the [=block axis=]
446+ :: Selects the direction along the [=block axis=] .
442447
443448: <code> inline</code>
444- :: Selects the direction along the [=inline axis=]
449+ :: Selects the direction along the [=inline axis=] .
445450
446451: <code> horizontal</code>
447- :: Selects the horizontal direction
452+ :: Selects the horizontal direction.
448453
449454: <code> vertical</code>
450- :: Selects the vertical direction
455+ :: Selects the vertical direction.
451456
452457<div class="issue">
453458
454459Should the physical directions ("horizontal" and "vertical") be removed, leaving
455460only the logical directions ("block" and "inline")?
456461
457- We should add an "auto" value here that means, "If only one direction is
458- scrollable use that direction, otherwise use the block direction".
459-
460- What about a value that means, "the longest scroll direction." That would be
462+ What about a value that means, "the longest scroll direction"? That would be
461463more reliable than "auto" for the case where layout differences could mean that,
462464although normally you only expect the inline direction to be scrollable, on
463465some devices you end up with a small scrollable range in the block direction
@@ -494,7 +496,7 @@ The {{ScrollTriggerKind}} enumeration specifies the kind of a {{ScrollTrigger}}.
494496dictionary ScrollTriggerOptions {
495497 Element scrollSource;
496498 ScrollTriggerKind kind = "offset";
497- ScrollDirection orientation;
499+ ScrollDirection orientation = "auto" ;
498500 DOMString scrollOffset = "auto";
499501 DOMString endScrollOffset = "auto";
500502};
@@ -542,13 +544,6 @@ element.
542544:: Determines the direction of scrolling which drives the activation and deactivation
543545 of the trigger.
544546
545- If a value for {{orientation}} is not specified, and {{scrollSource}} is only scrollable
546- in one direction, that direction is used; if {{scrollSource}} is scrollable
547- in both directions, the {{block}} direction is used.
548-
549- Issue: I think we should simply define a suitable "auto" value and make that
550- the default value in the {{ScrollTriggerOptions}} dictionary.
551-
552547: <dfn attribute for=ScrollTrigger>scrollOffset</dfn>
553548:: The scroll offset, in the direction specified by {{orientation}} , that triggers
554549 activation of the trigger.
0 commit comments