html5/spec Overview.html,1.2000,1.2001

Update of /sources/public/html5/spec
In directory hutz:/tmp/cvs-serv12597

Modified Files:
	Overview.html 
Log Message:
Change the way we find fragment identifiers to be slightly more compatible with legacy content. (whatwg r2830)

Index: Overview.html
===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.2000
retrieving revision 1.2001
diff -u -d -r1.2000 -r1.2001
--- Overview.html	18 Feb 2009 02:03:37 -0000	1.2000
+++ Overview.html	18 Feb 2009 03:27:21 -0000	1.2001
@@ -32623,6 +32623,27 @@
 
     </dl></li>
 
+   <li><p>If <a href=#the-document-s-address>the document's address</a> has a fragment
+   identifier, then run these substeps:</p>
+
+    <ol><li><p>Wait for a user-agent defined amount of time, as desired
+     by the user agent implementor. (This is intended to allow the
+     user agent to optimise the user experience in the face of
+     performance concerns.)</li>
+
+     <li><p>If the <code>Document</code> object has no parser, or its
+     parser has <a href=#stop-parsing title="stop parsing">stopped parsing</a>, or
+     the user agent has reason to believe the user is no longer
+     interested in scrolling to the fragment identifier, then abort
+     these substeps.</li>
+
+     <li><p><a href=#scroll-to-the-fragment-identifier>Scroll to the fragment identifier</a> given in
+     <a href=#the-document-s-address>the document's address</a>. If this fails to find <a href=#the-indicated-part-of-the-document title="the indicated part of the document">an indicated part of
+     the document</a>, then return to the first step of these
+     substeps.</li>
+
+    </ol></li>
+
   </ol><h4 id=read-html><span class=secno>5.10.2 </span><dfn title=navigate-html>Page load processing model for HTML files</dfn></h4><p>When an HTML document is to be loaded in a <a href=#browsing-context>browsing
   context</a>, the user agent must create a <code>Document</code>
   object, mark it as being an <a href=#html-documents title="HTML documents">HTML
@@ -32774,21 +32795,28 @@
   types is the responsibility of RFC3023).<p>For HTML documents (and the <code>text/html</code> MIME type),
   the following processing model must be followed to determine what
   <a href=#the-indicated-part-of-the-document>the indicated part of the document</a> is.<ol><li><p><a href=#parse-a-url title="parse a url">Parse</a> the <a href=#url>URL</a>,
-   and let <i>fragid</i> be the <a href=#url-fragment title=url-fragment>&lt;fragment&gt;</a> component of the
+   and let <var title="">fragid</var> be the <a href=#url-fragment title=url-fragment>&lt;fragment&gt;</a> component of the
    URL.</li><!-- parsing can't fail, since we checked earlier on
    when navigating -->
 
-   <li><p>If <i>fragid</i> is the empty string, then the indicated
-   part of the document is the top of the document.</li>
+   <li><p>If <var title="">fragid</var> is the empty string, then the
+   indicated part of the document is the top of the document.</li>
 
-   <li><p>If there is an element in the DOM that has an ID exactly
-   equal to <i>fragid</i>, then the first such element in tree order
-   is <a href=#the-indicated-part-of-the-document>the indicated part of the document</a>; stop the
-   algorithm here.</li>
+   <li><p>Let <var title="">decoded fragid</var> be the result of
+   expanding any sequences of percent-encoded octets in <var title="">fragid</var> that are valid UTF-8 sequences into Unicode
+   characters as defined by UTF-8. If any percent-encoded octets in
+   that string are not valid UTF-8 sequences, then skip this step and
+   the next one.</p>
+
+   <li><p>If this step was not skipped and there is an element in the
+   DOM that has an ID exactly equal to <var title="">decoded
+   fragid</var>, then the first such element in tree order is
+   <a href=#the-indicated-part-of-the-document>the indicated part of the document</a>; stop the algorithm
+   here.</li>
 
    <li><p>If there is an <code><a href=#the-a-element>a</a></code> element in the DOM that has a
    <code title=attr-a-name><a href=#attr-a-name>name</a></code> attribute whose value is
-   exactly equal to <i>fragid</i>, then the first such element in tree
+   exactly equal to <var title="">fragid</var> (<em>not</em> <var title="">decoded fragid</var>), then the first such element in tree
    order is <a href=#the-indicated-part-of-the-document>the indicated part of the document</a>; stop the
    algorithm here.</li>
 

Received on Wednesday, 18 February 2009 03:27:32 UTC