[html5] r8743 - [e] (0) Clean up usemap-related algorithms Fixing https://www.w3.org/Bugs/Public [...]

whatwg at whatwg.org whatwg at whatwg.org
Thu Sep 4 14:21:38 PDT 2014


Author: ianh
Date: 2014-09-04 14:21:34 -0700 (Thu, 04 Sep 2014)
New Revision: 8743

Modified:
   complete.html
   index
   source
Log:
[e] (0) Clean up usemap-related algorithms
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=26359
Affected topics: HTML

Modified: complete.html
===================================================================
--- complete.html	2014-09-04 21:16:25 UTC (rev 8742)
+++ complete.html	2014-09-04 21:21:34 UTC (rev 8743)
@@ -4254,12 +4254,12 @@
 
   
 
-  <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>
 
   
@@ -27210,8 +27210,8 @@
   <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>

Modified: index
===================================================================
--- index	2014-09-04 21:16:25 UTC (rev 8742)
+++ index	2014-09-04 21:21:34 UTC (rev 8743)
@@ -4254,12 +4254,12 @@
 
   
 
-  <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>
 
   
@@ -27210,8 +27210,8 @@
   <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>

Modified: source
===================================================================
--- source	2014-09-04 21:16:25 UTC (rev 8742)
+++ source	2014-09-04 21:21:34 UTC (rev 8743)
@@ -6323,7 +6323,7 @@
 
   <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>
 
@@ -6334,7 +6334,7 @@
    <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>
 
@@ -35303,8 +35303,8 @@
 
   <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



More information about the Commit-Watchers mailing list