[html5] r7979 - [giow] (3) Finally clean up how we scroll to the top of a document Fixing https: [...]
whatwg at whatwg.org
whatwg at whatwg.org
Fri Jun 14 12:06:25 PDT 2013
Author: ianh
Date: 2013-06-14 12:06:24 -0700 (Fri, 14 Jun 2013)
New Revision: 7979
Modified:
complete.html
index
source
Log:
[giow] (3) Finally clean up how we scroll to the top of a document
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=15588
Affected topics: HTML
Modified: complete.html
===================================================================
--- complete.html 2013-06-14 18:49:53 UTC (rev 7978)
+++ complete.html 2013-06-14 19:06:24 UTC (rev 7979)
@@ -3795,6 +3795,7 @@
<li><dfn id=alternative-style-sheet-sets>Alternative style sheet sets</dfn> and the <dfn id=preferred-style-sheet-set>preferred style sheet set</dfn></li>
<li><dfn id=serializing-a-css-value>Serializing a CSS value</dfn></li>
<li><dfn id=scroll-an-element-into-view>Scroll an element into view</dfn></li>
+ <li><dfn id=scroll-to-the-beginning-of-the-document>Scroll to the beginning of the document</dfn></li>
</ul><p>The term <dfn id=css-styling-attribute>CSS styling attribute</dfn> is defined in the <cite>CSS Style Attributes</cite>
specification. <a href=#refsCSSATTR>[CSSATTR]</a></p>
@@ -68100,14 +68101,23 @@
take care of the scrolling instead, as the last few steps of its <a href=#update-the-session-history-with-the-new-page>update the session history
with the new page</a> algorithm.</p>
- <hr><p>When the user agent is required to <dfn id=scroll-to-the-fragment-identifier>scroll to the fragment identifier</dfn>, it must either
- change the scrolling position of the document using the <a href=#scroll-an-element-into-view>scroll an element into view</a>
- algorithm defined in the CSSOM View specification, with the <var title="">align to top flag</var>
- set, or perform some other action, such that <a href=#the-indicated-part-of-the-document>the indicated part of the document</a> is
- brought to the user's attention. If there is no indicated part, or if the indicated part is not
- <a href=#being-rendered>being rendered</a>, then the user agent must not scroll anywhere. <a href=#refsCSSOMVIEW>[CSSOMVIEW]</a></p>
+ <hr><p>When the user agent is required to <dfn id=scroll-to-the-fragment-identifier>scroll to the fragment identifier</dfn> and <a href=#the-indicated-part-of-the-document>the
+ indicated part of the document</a>, if any, is <a href=#being-rendered>being rendered</a>, the user agent must
+ either change the scrolling position of the document using the following algorithm, or perform
+ some other action such that <a href=#the-indicated-part-of-the-document>the indicated part of the document</a> is brought to the
+ user's attention. If there is no indicated part, or if the indicated part is not <a href=#being-rendered>being
+ rendered</a>, then the user agent must do nothing. The aforementioned algorithm is as
+ follows:</p>
- <p><dfn id=the-indicated-part-of-the-document>The indicated part of the document</dfn> is the one that the fragment identifier, if any,
+ <ol><li><p>Let <var title="">target</var> be <a href=#the-indicated-part-of-the-document>the indicated part of the
+ document</a>, as defined below.</li>
+
+ <li><p>If <var title="">target</var> is the top of the document, then <a href=#scroll-to-the-beginning-of-the-document>scroll to the
+ beginning of the document</a> for the <code><a href=#document>Document</a></code>. <a href=#refsCSSOMVIEW>[CSSOMVIEW]</a></li>
+
+ <li><p>Otherwise, use the <a href=#scroll-an-element-into-view>scroll an element into view</a> algorithm to scroll <var title="">target</var> into view, with the <var title="">align to top flag</var> set. <a href=#refsCSSOMVIEW>[CSSOMVIEW]</a></li>
+
+ </ol><p><dfn id=the-indicated-part-of-the-document>The indicated part of the document</dfn> is the one that the fragment identifier, if any,
identifies. The semantics of the fragment identifier in terms of mapping it to a specific DOM Node
is defined by the specification that defines the <a href=#mime-type>MIME type</a> used by the
<code><a href=#document>Document</a></code> (for example, the processing of fragment identifiers for <a href=#xml-mime-type title="XML
Modified: index
===================================================================
--- index 2013-06-14 18:49:53 UTC (rev 7978)
+++ index 2013-06-14 19:06:24 UTC (rev 7979)
@@ -3795,6 +3795,7 @@
<li><dfn id=alternative-style-sheet-sets>Alternative style sheet sets</dfn> and the <dfn id=preferred-style-sheet-set>preferred style sheet set</dfn></li>
<li><dfn id=serializing-a-css-value>Serializing a CSS value</dfn></li>
<li><dfn id=scroll-an-element-into-view>Scroll an element into view</dfn></li>
+ <li><dfn id=scroll-to-the-beginning-of-the-document>Scroll to the beginning of the document</dfn></li>
</ul><p>The term <dfn id=css-styling-attribute>CSS styling attribute</dfn> is defined in the <cite>CSS Style Attributes</cite>
specification. <a href=#refsCSSATTR>[CSSATTR]</a></p>
@@ -68100,14 +68101,23 @@
take care of the scrolling instead, as the last few steps of its <a href=#update-the-session-history-with-the-new-page>update the session history
with the new page</a> algorithm.</p>
- <hr><p>When the user agent is required to <dfn id=scroll-to-the-fragment-identifier>scroll to the fragment identifier</dfn>, it must either
- change the scrolling position of the document using the <a href=#scroll-an-element-into-view>scroll an element into view</a>
- algorithm defined in the CSSOM View specification, with the <var title="">align to top flag</var>
- set, or perform some other action, such that <a href=#the-indicated-part-of-the-document>the indicated part of the document</a> is
- brought to the user's attention. If there is no indicated part, or if the indicated part is not
- <a href=#being-rendered>being rendered</a>, then the user agent must not scroll anywhere. <a href=#refsCSSOMVIEW>[CSSOMVIEW]</a></p>
+ <hr><p>When the user agent is required to <dfn id=scroll-to-the-fragment-identifier>scroll to the fragment identifier</dfn> and <a href=#the-indicated-part-of-the-document>the
+ indicated part of the document</a>, if any, is <a href=#being-rendered>being rendered</a>, the user agent must
+ either change the scrolling position of the document using the following algorithm, or perform
+ some other action such that <a href=#the-indicated-part-of-the-document>the indicated part of the document</a> is brought to the
+ user's attention. If there is no indicated part, or if the indicated part is not <a href=#being-rendered>being
+ rendered</a>, then the user agent must do nothing. The aforementioned algorithm is as
+ follows:</p>
- <p><dfn id=the-indicated-part-of-the-document>The indicated part of the document</dfn> is the one that the fragment identifier, if any,
+ <ol><li><p>Let <var title="">target</var> be <a href=#the-indicated-part-of-the-document>the indicated part of the
+ document</a>, as defined below.</li>
+
+ <li><p>If <var title="">target</var> is the top of the document, then <a href=#scroll-to-the-beginning-of-the-document>scroll to the
+ beginning of the document</a> for the <code><a href=#document>Document</a></code>. <a href=#refsCSSOMVIEW>[CSSOMVIEW]</a></li>
+
+ <li><p>Otherwise, use the <a href=#scroll-an-element-into-view>scroll an element into view</a> algorithm to scroll <var title="">target</var> into view, with the <var title="">align to top flag</var> set. <a href=#refsCSSOMVIEW>[CSSOMVIEW]</a></li>
+
+ </ol><p><dfn id=the-indicated-part-of-the-document>The indicated part of the document</dfn> is the one that the fragment identifier, if any,
identifies. The semantics of the fragment identifier in terms of mapping it to a specific DOM Node
is defined by the specification that defines the <a href=#mime-type>MIME type</a> used by the
<code><a href=#document>Document</a></code> (for example, the processing of fragment identifiers for <a href=#xml-mime-type title="XML
Modified: source
===================================================================
--- source 2013-06-14 18:49:53 UTC (rev 7978)
+++ source 2013-06-14 19:06:24 UTC (rev 7979)
@@ -2639,6 +2639,7 @@
<li><dfn>Alternative style sheet sets</dfn> and the <dfn>preferred style sheet set</dfn></li>
<li><dfn>Serializing a CSS value</dfn></li>
<li><dfn>Scroll an element into view</dfn></li>
+ <li><dfn>Scroll to the beginning of the document</dfn></li>
</ul>
<p>The term <dfn>CSS styling attribute</dfn> is defined in the <cite>CSS Style Attributes</cite>
@@ -76009,14 +76010,29 @@
<hr>
- <p>When the user agent is required to <dfn>scroll to the fragment identifier</dfn>, it must either
- change the scrolling position of the document using the <span>scroll an element into view</span>
- algorithm defined in the CSSOM View specification, with the <var title="">align to top flag</var>
- set, or perform some other action, such that <span>the indicated part of the document</span> is
- brought to the user's attention. If there is no indicated part, or if the indicated part is not
- <span>being rendered</span>, then the user agent must not scroll anywhere. <a
- href="#refsCSSOMVIEW">[CSSOMVIEW]</a></p>
+ <p>When the user agent is required to <dfn>scroll to the fragment identifier</dfn> and <span>the
+ indicated part of the document</span>, if any, is <span>being rendered</span>, the user agent must
+ either change the scrolling position of the document using the following algorithm, or perform
+ some other action such that <span>the indicated part of the document</span> is brought to the
+ user's attention. If there is no indicated part, or if the indicated part is not <span>being
+ rendered</span>, then the user agent must do nothing. The aforementioned algorithm is as
+ follows:</p>
+ <ol>
+
+ <li><p>Let <var title="">target</var> be <span>the indicated part of the
+ document</span>, as defined below.</p></li>
+
+ <li><p>If <var title="">target</var> is the top of the document, then <span>scroll to the
+ beginning of the document</span> for the <code>Document</code>. <a
+ href="#refsCSSOMVIEW">[CSSOMVIEW]</a></p></li>
+
+ <li><p>Otherwise, use the <span>scroll an element into view</span> algorithm to scroll <var
+ title="">target</var> into view, with the <var title="">align to top flag</var> set. <a
+ href="#refsCSSOMVIEW">[CSSOMVIEW]</a></p></li>
+
+ </ol>
+
<p><dfn>The indicated part of the document</dfn> is the one that the fragment identifier, if any,
identifies. The semantics of the fragment identifier in terms of mapping it to a specific DOM Node
is defined by the specification that defines the <span>MIME type</span> used by the
More information about the Commit-Watchers
mailing list