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
<p>When a user agent is to perform an <dfnid="concept-instant-scroll" title="concept-instant-scroll">instant scroll</dfn> of a scrolling box <var>box</var> to
484
482
<var>position</var>, it must update the scroll position of <var>box</var> to <var>position</var>.
<p>To <dfnid="scroll-to-the-beginning-of-the-document">scroll to the beginning of the document</dfn> for a document <var>document</var>, follow these steps:
489
485
490
486
<ol>
491
487
<li><p>Let <var>viewport</var> be the <ahref="#viewport">viewport</a> that is associated with <var>document</var>. <!-- This assumes that there is a viewport, since
492
488
it is only invoked when navigating -->
493
489
<li><p>Let <var>position</var> be the the scroll position the <ahref="#viewport">viewport</a> would have by aligning the <ahref="#beginning-edges">beginning edges</a> of the
494
490
<ahref="#scrolling-area">scrolling area</a> with the <ahref="#beginning-edges">beginning edges</a> of the <ahref="#viewport">viewport</a>.
491
+
<li><p>If <var>position</var> is the same as <var>viewport</var>'s current scroll position, and <var>viewport</var> does not have an ongoing
492
+
<ahref="#concept-smooth-scroll" title="concept-smooth-scroll">smooth scroll</a>, abort these steps.
495
493
<li><p>Let <var>task</var> be these steps:
496
494
<ol>
497
495
<li><p><aclass="external" data-anolis-spec="dom" href="http://dom.spec.whatwg.org/#concept-event-fire" title="concept-event-fire">Fire an event</a> named <codetitle="">scroll</code> that bubbles at <var>document</var>.
Copy file name to clipboardExpand all lines: cssom-view/Overview.src.html
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -443,15 +443,15 @@ <h3>Scrolling</h3>
443
443
<p>When a user agent is to perform an <dfntitle=concept-instant-scroll>instant scroll</dfn> of a scrolling box <var>box</var> to
444
444
<var>position</var>, it must update the scroll position of <var>box</var> to <var>position</var>.
445
445
446
-
<h4>Common Scroll Positions</h4>
447
-
448
446
<p>To <dfn>scroll to the beginning of the document</dfn> for a document <var>document</var>, follow these steps:
449
447
450
448
<ol>
451
449
<li><p>Let <var>viewport</var> be the <span>viewport</span> that is associated with <var>document</var>. <!-- This assumes that there is a viewport, since
452
450
it is only invoked when navigating -->
453
451
<li><p>Let <var>position</var> be the the scroll position the <span>viewport</span> would have by aligning the <span>beginning edges</span> of the
454
452
<span>scrolling area</span> with the <span>beginning edges</span> of the <span>viewport</span>.
453
+
<li><p>If <var>position</var> is the same as <var>viewport</var>'s current scroll position, and <var>viewport</var> does not have an ongoing
454
+
<spantitle=concept-smooth-scroll>smooth scroll</span>, abort these steps.
455
455
<li><p>Let <var>task</var> be these steps:
456
456
<ol>
457
457
<li><p><spandata-anolis-spec=domtitle=concept-event-fire>Fire an event</span> named <codetitle>scroll</code> that bubbles at <var>document</var>.
0 commit comments