Skip to content

Commit

Permalink
[e] (0) Update integration with URL spec and Encoding spec.
Browse files Browse the repository at this point in the history
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=20923
Affected topics: HTML

git-svn-id: http://svn.whatwg.org/webapps@7796 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Apr 9, 2013
1 parent e01fd7d commit 86061d2
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 25 deletions.
21 changes: 13 additions & 8 deletions complete.html
Expand Up @@ -3436,6 +3436,8 @@ <h4 id=dependencies><span class=secno>2.2.2 </span>Dependencies</h4>
<li><dfn id=default-encode-set>Default encode set</dfn>
<li><dfn id=percent-encode>Percent encode</dfn>
<li><dfn id=utf-8-percent-encode>UTF-8 percent encode</dfn>
<li><dfn id=percent-decode>Percent decode</dfn>
<li><dfn id=decoder-error>Decoder error</dfn>
<li><dfn id=urlutils><code>URLUtils</code></dfn> interface
<li><dfn id=urlutilsreadonly><code>URLUtilsReadOnly</code></dfn> interface
<li><dfn id=dom-url-href title=dom-url-href><code>href</code> attribute</dfn>
Expand Down Expand Up @@ -67867,16 +67869,19 @@ <h4 id=scroll-to-fragid><span class=secno>6.6.9 </span><dfn title=navigate-fragi
<li><p>If <var title="">fragid</var> is the empty string, then <a href=#the-indicated-part-of-the-document>the indicated part of the
document</a> is the top of the document; 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 (e.g. they expand to surrogate code points), then skip this step and the next one.</p>
<li><p>Let <var title="">fragid bytes</var> be the result of <a href=#percent-decode title="percent
decode">percent-decoding</a> <var title="">fragid</var>.</li>

<li><p>If this step was not skipped and there is an element in the DOM that has an <a href=#concept-id title=concept-id>ID</a> 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>Let <var title="">decoded fragid</var> be the result of applying the <a href=#utf-8-decoder>UTF-8
decoder</a> algorithm to <var title="">fragid bytes</var>. If the <a href=#utf-8-decoder>UTF-8 decoder</a>
emits a <a href=#decoder-error>decoder error</a>, abort the decoder and instead jump to the step labeled <i>no
decoded fragid</i>.</li>

<li><p>If there is an element in the DOM that has an <a href=#concept-id title=concept-id>ID</a> 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 <var title="">fragid</var> (<em>not</em> <var title="">decoded fragid</var>), then the first such
<li><p><i>No decoded fragid</i>: 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 <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>

Expand Down
21 changes: 13 additions & 8 deletions index
Expand Up @@ -3436,6 +3436,8 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
<li><dfn id=default-encode-set>Default encode set</dfn>
<li><dfn id=percent-encode>Percent encode</dfn>
<li><dfn id=utf-8-percent-encode>UTF-8 percent encode</dfn>
<li><dfn id=percent-decode>Percent decode</dfn>
<li><dfn id=decoder-error>Decoder error</dfn>
<li><dfn id=urlutils><code>URLUtils</code></dfn> interface
<li><dfn id=urlutilsreadonly><code>URLUtilsReadOnly</code></dfn> interface
<li><dfn id=dom-url-href title=dom-url-href><code>href</code> attribute</dfn>
Expand Down Expand Up @@ -67867,16 +67869,19 @@ State: &lt;OUTPUT NAME=I&gt;1&lt;/OUTPUT&gt; &lt;INPUT VALUE="Increment" TYPE=BU
<li><p>If <var title="">fragid</var> is the empty string, then <a href=#the-indicated-part-of-the-document>the indicated part of the
document</a> is the top of the document; 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 (e.g. they expand to surrogate code points), then skip this step and the next one.</p>
<li><p>Let <var title="">fragid bytes</var> be the result of <a href=#percent-decode title="percent
decode">percent-decoding</a> <var title="">fragid</var>.</li>

<li><p>If this step was not skipped and there is an element in the DOM that has an <a href=#concept-id title=concept-id>ID</a> 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>Let <var title="">decoded fragid</var> be the result of applying the <a href=#utf-8-decoder>UTF-8
decoder</a> algorithm to <var title="">fragid bytes</var>. If the <a href=#utf-8-decoder>UTF-8 decoder</a>
emits a <a href=#decoder-error>decoder error</a>, abort the decoder and instead jump to the step labeled <i>no
decoded fragid</i>.</li>

<li><p>If there is an element in the DOM that has an <a href=#concept-id title=concept-id>ID</a> 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 <var title="">fragid</var> (<em>not</em> <var title="">decoded fragid</var>), then the first such
<li><p><i>No decoded fragid</i>: 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 <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>

Expand Down
22 changes: 13 additions & 9 deletions source
Expand Up @@ -2241,6 +2241,8 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
<li><dfn>Default encode set</dfn>
<li><dfn>Percent encode</dfn>
<li><dfn>UTF-8 percent encode</dfn>
<li><dfn>Percent decode</dfn>
<li><dfn>Decoder error</dfn>
<li><dfn><code>URLUtils</code></dfn> interface
<li><dfn><code>URLUtilsReadOnly</code></dfn> interface
<li><dfn title="dom-url-href"><code>href</code> attribute</dfn>
Expand Down Expand Up @@ -80300,17 +80302,19 @@ State: &lt;OUTPUT NAME=I>1&lt;/OUTPUT> &lt;INPUT VALUE="Increment" TYPE=BUTTON O
<li><p>If <var title="">fragid</var> is the empty string, then <span>the indicated part of the
document</span> is the top of the document; stop the algorithm here.</p></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 (e.g. they expand to surrogate code points), then skip this step and the next one.</p>
<li><p>Let <var title="">fragid bytes</var> be the result of <span title="percent
decode">percent-decoding</span> <var title="">fragid</var>.</p></li>

<li><p>If this step was not skipped and there is an element in the DOM that has an <span
title="concept-id">ID</span> exactly equal to <var title="">decoded fragid</var>, then the first
such element in tree order is <span>the indicated part of the document</span>; stop the algorithm
here.</p></li>
<li><p>Let <var title="">decoded fragid</var> be the result of applying the <span>UTF-8
decoder</span> algorithm to <var title="">fragid bytes</var>. If the <span>UTF-8 decoder</span>
emits a <span>decoder error</span>, abort the decoder and instead jump to the step labeled <i>no
decoded fragid</i>.</p></li>

<li><p>If there is an element in the DOM that has an <span title="concept-id">ID</span> exactly
equal to <var title="">decoded fragid</var>, then the first such element in tree order is
<span>the indicated part of the document</span>; stop the algorithm here.</p></li>

<li><p>If there is an <code>a</code> element in the DOM that has a <code
<li><p><i>No decoded fragid</i>: If there is an <code>a</code> element in the DOM that has a <code
title="attr-a-name">name</code> attribute whose value is exactly equal to <var
title="">fragid</var> (<em>not</em> <var title="">decoded fragid</var>), then the first such
element in tree order is <span>the indicated part of the document</span>; stop the algorithm
Expand Down

0 comments on commit 86061d2

Please sign in to comment.