Skip to content

Commit

Permalink
[e] (0) Clean up usemap-related algorithms
Browse files Browse the repository at this point in the history
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=26359
Affected topics: HTML

git-svn-id: http://svn.whatwg.org/webapps@8743 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Sep 4, 2014
1 parent 60dfc61 commit 5f3cea7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions complete.html
Expand Up @@ -4254,12 +4254,12 @@ <h4 id=syntax-references>2.4.9 References</h4>



<p>The <dfn id=rules-for-parsing-a-hash-name-reference>rules for parsing a hash-name reference</dfn> to an element of type <var>type</var> are as follows:</p>
<p>The <dfn id=rules-for-parsing-a-hash-name-reference>rules for parsing a hash-name reference</dfn> to an element of type <var>type</var>, given a context node <var>scope</var>, are as follows:</p>

<ol><li><p>If the string being parsed does not contain a U+0023 NUMBER SIGN character, or if the
first such character in the string is the last character in the string, then return null and
abort these steps.<li><p>Let <var>s</var> be the string from the character immediately after the first
U+0023 NUMBER SIGN character in the string being parsed up to the end of that string.<li><p>Return the first element of type <var>type</var> that has an <code id=syntax-references:the-id-attribute><a href=#the-id-attribute>id</a></code> attribute whose value is a <a href=#case-sensitive id=syntax-references:case-sensitive>case-sensitive</a> match for <var>s</var> or a <code>name</code> attribute whose value is a <a href=#compatibility-caseless id=syntax-references:compatibility-caseless>compatibility
U+0023 NUMBER SIGN character in the string being parsed up to the end of that string.<li><p>Return the first element of type <var>type</var> in <a href=#tree-order id=syntax-references:tree-order>tree order</a> in the subtree rooted at <var>scope</var> that has an <code id=syntax-references:the-id-attribute><a href=#the-id-attribute>id</a></code> attribute whose value is a <a href=#case-sensitive id=syntax-references:case-sensitive>case-sensitive</a> match for <var>s</var> or a <code>name</code> attribute whose value is a <a href=#compatibility-caseless id=syntax-references:compatibility-caseless>compatibility
caseless</a> match for <var>s</var>.</ol>


Expand Down Expand Up @@ -27210,8 +27210,8 @@ <h5 id=processing-model-2>4.8.17.2 Processing model</h5>
<code id=processing-model-2:attr-hyperlink-usemap><a href=#attr-hyperlink-usemap>usemap</a></code> attribute specified, user agents must process it
as follows:</p>

<ol><li><p>First, <a href=#rules-for-parsing-a-hash-name-reference id=processing-model-2:rules-for-parsing-a-hash-name-reference>rules for parsing a hash-name reference</a> to a <code id=processing-model-2:the-map-element><a href=#the-map-element>map</a></code> element
must be followed. This will return either an element (the <var>map</var>) or
<ol><li><p>Parse the attribute's value using the <a href=#rules-for-parsing-a-hash-name-reference id=processing-model-2:rules-for-parsing-a-hash-name-reference>rules for parsing a hash-name reference</a> to a <code id=processing-model-2:the-map-element><a href=#the-map-element>map</a></code> element, with the element's <a id=processing-model-2:node-document href=http://dom.spec.whatwg.org/#concept-node-document data-x-internal=node-document>node document</a> as the context node.
This will return either an element (the <var>map</var>) or
null.<li><p>If that returned null, then abort these steps. The image is not associated with an image
map after all.<li><p>Otherwise, the user agent must collect all the <code id=processing-model-2:the-area-element><a href=#the-area-element>area</a></code> elements that are
descendants of the <var>map</var>. Let those be the <var>areas</var>.</ol>
Expand Down
8 changes: 4 additions & 4 deletions index
Expand Up @@ -4254,12 +4254,12 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d



<p>The <dfn id=rules-for-parsing-a-hash-name-reference>rules for parsing a hash-name reference</dfn> to an element of type <var>type</var> are as follows:</p>
<p>The <dfn id=rules-for-parsing-a-hash-name-reference>rules for parsing a hash-name reference</dfn> to an element of type <var>type</var>, given a context node <var>scope</var>, are as follows:</p>

<ol><li><p>If the string being parsed does not contain a U+0023 NUMBER SIGN character, or if the
first such character in the string is the last character in the string, then return null and
abort these steps.<li><p>Let <var>s</var> be the string from the character immediately after the first
U+0023 NUMBER SIGN character in the string being parsed up to the end of that string.<li><p>Return the first element of type <var>type</var> that has an <code id=syntax-references:the-id-attribute><a href=#the-id-attribute>id</a></code> attribute whose value is a <a href=#case-sensitive id=syntax-references:case-sensitive>case-sensitive</a> match for <var>s</var> or a <code>name</code> attribute whose value is a <a href=#compatibility-caseless id=syntax-references:compatibility-caseless>compatibility
U+0023 NUMBER SIGN character in the string being parsed up to the end of that string.<li><p>Return the first element of type <var>type</var> in <a href=#tree-order id=syntax-references:tree-order>tree order</a> in the subtree rooted at <var>scope</var> that has an <code id=syntax-references:the-id-attribute><a href=#the-id-attribute>id</a></code> attribute whose value is a <a href=#case-sensitive id=syntax-references:case-sensitive>case-sensitive</a> match for <var>s</var> or a <code>name</code> attribute whose value is a <a href=#compatibility-caseless id=syntax-references:compatibility-caseless>compatibility
caseless</a> match for <var>s</var>.</ol>


Expand Down Expand Up @@ -27210,8 +27210,8 @@ dictionary <dfn id=trackeventinit>TrackEventInit</dfn> : <a href=#eventinit id=t
<code id=processing-model-2:attr-hyperlink-usemap><a href=#attr-hyperlink-usemap>usemap</a></code> attribute specified, user agents must process it
as follows:</p>

<ol><li><p>First, <a href=#rules-for-parsing-a-hash-name-reference id=processing-model-2:rules-for-parsing-a-hash-name-reference>rules for parsing a hash-name reference</a> to a <code id=processing-model-2:the-map-element><a href=#the-map-element>map</a></code> element
must be followed. This will return either an element (the <var>map</var>) or
<ol><li><p>Parse the attribute's value using the <a href=#rules-for-parsing-a-hash-name-reference id=processing-model-2:rules-for-parsing-a-hash-name-reference>rules for parsing a hash-name reference</a> to a <code id=processing-model-2:the-map-element><a href=#the-map-element>map</a></code> element, with the element's <a id=processing-model-2:node-document href=http://dom.spec.whatwg.org/#concept-node-document data-x-internal=node-document>node document</a> as the context node.
This will return either an element (the <var>map</var>) or
null.<li><p>If that returned null, then abort these steps. The image is not associated with an image
map after all.<li><p>Otherwise, the user agent must collect all the <code id=processing-model-2:the-area-element><a href=#the-area-element>area</a></code> elements that are
descendants of the <var>map</var>. Let those be the <var>areas</var>.</ol>
Expand Down
8 changes: 4 additions & 4 deletions source
Expand Up @@ -6323,7 +6323,7 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d

<div w-nodev>

<p>The <dfn>rules for parsing a hash-name reference</dfn> to an element of type <var>type</var> are as follows:</p>
<p>The <dfn>rules for parsing a hash-name reference</dfn> to an element of type <var>type</var>, given a context node <var>scope</var>, are as follows:</p>

<ol>

Expand All @@ -6334,7 +6334,7 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
<li><p>Let <var>s</var> be the string from the character immediately after the first
U+0023 NUMBER SIGN character in the string being parsed up to the end of that string.</p></li>

<li><p>Return the first element of type <var>type</var> that has an <code
<li><p>Return the first element of type <var>type</var> in <span>tree order</span> in the subtree rooted at <var>scope</var> that has an <code
data-x="attr-id">id</code> attribute whose value is a <span>case-sensitive</span> match for <var>s</var> or a <code data-x="">name</code> attribute whose value is a <span>compatibility
caseless</span> match for <var>s</var>.</p></li>

Expand Down Expand Up @@ -35303,8 +35303,8 @@ dictionary <dfn>TrackEventInit</dfn> : <span>EventInit</span> {

<ol>

<li><p>First, <span>rules for parsing a hash-name reference</span> to a <code>map</code> element
must be followed. This will return either an element (the <var>map</var>) or
<li><p>Parse the attribute's value using the <span>rules for parsing a hash-name reference</span> to a <code>map</code> element, with the element's <span>node document</span> as the context node.
This will return either an element (the <var>map</var>) or
null.</p></li>

<li><p>If that returned null, then abort these steps. The image is not associated with an image
Expand Down

0 comments on commit 5f3cea7

Please sign in to comment.