[html5] r4609 - [acgiowt] (0) Reverting itemref='' change to fix it (it broke itemref='' referen [...]

whatwg at whatwg.org whatwg at whatwg.org
Mon Jan 18 03:09:00 PST 2010


Author: ianh
Date: 2010-01-18 03:08:58 -0800 (Mon, 18 Jan 2010)
New Revision: 4609

Modified:
   complete.html
   index
   source
Log:
[acgiowt] (0) Reverting itemref='' change to fix it (it broke itemref='' referencing the same properties from different items), so that the final checkin is a single checkin for ease of reference.

Modified: complete.html
===================================================================
--- complete.html	2010-01-18 11:03:20 UTC (rev 4608)
+++ complete.html	2010-01-18 11:08:58 UTC (rev 4609)
@@ -45475,43 +45475,9 @@
   specified, must have a value that is an <a href=#unordered-set-of-unique-space-separated-tokens>unordered set of
   unique space-separated tokens</a> consisting of <a href=#concept-id title=concept-ID>IDs</a> of elements in the same document; for
   each one, the element's nearest ancestor element with an <code title=attr-itemscope><a href=#attr-itemscope>itemscope</a></code> attribute specified, if any,
-  must not be the element with the referencing <code title=attr-itemref><a href=#attr-itemref>itemref</a></code> attribute specified, and the
-  element must not be <a href=#part-of-an-itemref-loop>part of an <code title=attr-itemref>itemref</code> loop</a>.</p>
+  must not be the element with the referencing <code title=attr-itemref><a href=#attr-itemref>itemref</a></code> attribute specified.</p>
 
-  <p>An element <var title="">e</var> is <dfn id=part-of-an-itemref-loop>part of an <code title=attr-itemref>itemref</code> loop</dfn> if the following
-  algorithm terminates in a failure state:</p>
-
-  <ol><li><p>Let <var title="">visited</var> be an empty list.</li>
-
-   <li><p>Let <var title="">pending</var> be a list containing only
-   the element <var title="">e</var>.</li>
-
-   <li>
-
-    <p>While <var title="">pending</var> is not empty, run the
-    following substeps:</p>
-
-    <ol><li><p>Let <var title="">current</var> be an element in <var title="">pending</var>, and remove that element from <var title="">pending</var>.</li>
-
-     <li><p>If <var title="">current</var> is in <var title="">visited</var>, terminate this algorithm in the failure
-     state.</li>
-
-     <li><p>Add <var title="">current</var> to <var title="">visited</var>.</li>
-
-     <li><p>If <var title="">current</var> has an <code title=attr-itemscope><a href=#attr-itemscope>itemscope</a></code> attribute but no <code title=attr-itemprop><a href=#names:-the-itemprop-attribute>itemprop</a></code> attribute, and <var title="">current</var> is not <var title="">e</var>, then skip
-     the remainder of these substeps for this value of <var title="">current</var>.</li>
-
-     <li><p>If <var title="">current</var> has an <code title=attr-itemscope><a href=#attr-itemscope>itemscope</a></code> attribute and an <code title=attr-itemref><a href=#attr-itemref>itemref</a></code> attribute, <a href=#split-a-string-on-spaces title="split
-     a string on spaces">split the value of that <code title=attr-itemref>itemref</code> attribute on
-     spaces</a>. For each resulting token <var title="">ID</var>,
-     if there is an element in the document with the <a href=#concept-id title=concept-ID>ID</a> <var title="">ID</var>, then add the
-     first such element to <var title="">pending</var>.</li>
-
-     <li><p>Add all the children elements of <var title="">current</var> to <var title="">pending</var>.</li>
-
-    </ol></li>
-
-  </ol><p>The <code title=attr-itemref><a href=#attr-itemref>itemref</a></code> attribute must not
+  <p>The <code title=attr-itemref><a href=#attr-itemref>itemref</a></code> attribute must not
   be specified on elements that do not have an <code title=attr-itemscope><a href=#attr-itemscope>itemscope</a></code> attribute specified.</p>
 
 
@@ -45700,11 +45666,6 @@
 
   <ol><li><p>Let <var title="">root</var> be the element with the <code title=attr-itemscope><a href=#attr-itemscope>itemscope</a></code> attribute.</li>
 
-   <li><p>If <var title="">root</var> is <a href=#part-of-an-itemref-loop>part of an <code title=attr-itemref>itemref</code> loop</a>, then return an
-   empty list as the <a href=#the-properties-of-an-item title="the properties of an
-   item">properties of the item</a> <var title="">root</var> and
-   abort these steps.</li>
-
    <li><p>Let <var title="">pending</var> be a stack of elements
    initially containing the child elements of <var title="">root</var>, if any. This list will be the one that holds
    the elements that still need to be crawled.</li>
@@ -45715,11 +45676,33 @@
 
    <li><p>If <var title="">root</var> has an <code title=attr-itemref><a href=#attr-itemref>itemref</a></code> attribute, <a href=#split-a-string-on-spaces title="split a
    string on spaces">split the value of that <code title=attr-itemref>itemref</code> attribute on spaces</a>. For
-   each resulting token <var title="">ID</var>, if there is an element
-   in the document with the <a href=#concept-id title=concept-ID>ID</a> <var title="">ID</var> and the first such element is not <a href=#part-of-an-itemref-loop>part of
-   an <code title=attr-itemref>itemref</code> loop</a>, then push
-   the first such element onto <var title="">pending</var>.</li>
+   each resulting token, <var title="">ID</var>, if there is an
+   element in the document with the <a href=#concept-id title=concept-ID>ID</a>
+   <var title="">ID</var>, then push the first such element onto <var title="">pending</var>.</li>
 
+   <li>
+
+    <p>For each element <var title="">candidate</var> in <var title="">pending</var>, run the following substeps:</p>
+
+    <ol><li><p>Let <var title="">scope</var> be <var title="">candidate</var>'s nearest ancestor element with an <code title=attr-itemscope><a href=#attr-itemscope>itemscope</a></code> attribute specified, if
+     any, or null otherwise.</li>
+
+     <li><p>If one of the other elements in <var title="">pending</var>
+     is also <var title="">candidate</var>, then remove <var title="">candidate</var> from <var title="">pending</var>
+     (i.e. remove duplicates).</li>
+
+     <li><p>Otherwise, if one of the other elements in <var title="">pending</var> is an ancestor element of <var title="">candidate</var>, and that element is <var title="">scope</var>, then remove <var title="">candidate</var>
+     from <var title="">pending</var> (since <var title="">candidate</var> will be reached anyway as part of
+     processing <var title="">scope</var>).</li>
+
+     <li><p>Otherwise, if one of the other elements in <var title="">pending</var> is an ancestor element of <var title="">candidate</var>, and either <var title="">scope</var> is
+     null or that element also has <var title="">scope</var> as its
+     nearest ancestor element with an <code title=attr-itemscope><a href=#attr-itemscope>itemscope</a></code> attribute specified, then
+     remove <var title="">candidate</var> from <var title="">pending</var> (since <var title="">candidate</var> will
+     be reached anyway as part of processing <var title="">scope</var>).</li>
+
+    </ol></li>
+
    <li><p>Sort <var title="">pending</var> in <a href=#tree-order>tree
    order</a>.</li>
 

Modified: index
===================================================================
--- index	2010-01-18 11:03:20 UTC (rev 4608)
+++ index	2010-01-18 11:08:58 UTC (rev 4609)
@@ -45375,43 +45375,9 @@
   specified, must have a value that is an <a href=#unordered-set-of-unique-space-separated-tokens>unordered set of
   unique space-separated tokens</a> consisting of <a href=#concept-id title=concept-ID>IDs</a> of elements in the same document; for
   each one, the element's nearest ancestor element with an <code title=attr-itemscope><a href=#attr-itemscope>itemscope</a></code> attribute specified, if any,
-  must not be the element with the referencing <code title=attr-itemref><a href=#attr-itemref>itemref</a></code> attribute specified, and the
-  element must not be <a href=#part-of-an-itemref-loop>part of an <code title=attr-itemref>itemref</code> loop</a>.</p>
+  must not be the element with the referencing <code title=attr-itemref><a href=#attr-itemref>itemref</a></code> attribute specified.</p>
 
-  <p>An element <var title="">e</var> is <dfn id=part-of-an-itemref-loop>part of an <code title=attr-itemref>itemref</code> loop</dfn> if the following
-  algorithm terminates in a failure state:</p>
-
-  <ol><li><p>Let <var title="">visited</var> be an empty list.</li>
-
-   <li><p>Let <var title="">pending</var> be a list containing only
-   the element <var title="">e</var>.</li>
-
-   <li>
-
-    <p>While <var title="">pending</var> is not empty, run the
-    following substeps:</p>
-
-    <ol><li><p>Let <var title="">current</var> be an element in <var title="">pending</var>, and remove that element from <var title="">pending</var>.</li>
-
-     <li><p>If <var title="">current</var> is in <var title="">visited</var>, terminate this algorithm in the failure
-     state.</li>
-
-     <li><p>Add <var title="">current</var> to <var title="">visited</var>.</li>
-
-     <li><p>If <var title="">current</var> has an <code title=attr-itemscope><a href=#attr-itemscope>itemscope</a></code> attribute but no <code title=attr-itemprop><a href=#names:-the-itemprop-attribute>itemprop</a></code> attribute, and <var title="">current</var> is not <var title="">e</var>, then skip
-     the remainder of these substeps for this value of <var title="">current</var>.</li>
-
-     <li><p>If <var title="">current</var> has an <code title=attr-itemscope><a href=#attr-itemscope>itemscope</a></code> attribute and an <code title=attr-itemref><a href=#attr-itemref>itemref</a></code> attribute, <a href=#split-a-string-on-spaces title="split
-     a string on spaces">split the value of that <code title=attr-itemref>itemref</code> attribute on
-     spaces</a>. For each resulting token <var title="">ID</var>,
-     if there is an element in the document with the <a href=#concept-id title=concept-ID>ID</a> <var title="">ID</var>, then add the
-     first such element to <var title="">pending</var>.</li>
-
-     <li><p>Add all the children elements of <var title="">current</var> to <var title="">pending</var>.</li>
-
-    </ol></li>
-
-  </ol><p>The <code title=attr-itemref><a href=#attr-itemref>itemref</a></code> attribute must not
+  <p>The <code title=attr-itemref><a href=#attr-itemref>itemref</a></code> attribute must not
   be specified on elements that do not have an <code title=attr-itemscope><a href=#attr-itemscope>itemscope</a></code> attribute specified.</p>
 
 
@@ -45600,11 +45566,6 @@
 
   <ol><li><p>Let <var title="">root</var> be the element with the <code title=attr-itemscope><a href=#attr-itemscope>itemscope</a></code> attribute.</li>
 
-   <li><p>If <var title="">root</var> is <a href=#part-of-an-itemref-loop>part of an <code title=attr-itemref>itemref</code> loop</a>, then return an
-   empty list as the <a href=#the-properties-of-an-item title="the properties of an
-   item">properties of the item</a> <var title="">root</var> and
-   abort these steps.</li>
-
    <li><p>Let <var title="">pending</var> be a stack of elements
    initially containing the child elements of <var title="">root</var>, if any. This list will be the one that holds
    the elements that still need to be crawled.</li>
@@ -45615,11 +45576,33 @@
 
    <li><p>If <var title="">root</var> has an <code title=attr-itemref><a href=#attr-itemref>itemref</a></code> attribute, <a href=#split-a-string-on-spaces title="split a
    string on spaces">split the value of that <code title=attr-itemref>itemref</code> attribute on spaces</a>. For
-   each resulting token <var title="">ID</var>, if there is an element
-   in the document with the <a href=#concept-id title=concept-ID>ID</a> <var title="">ID</var> and the first such element is not <a href=#part-of-an-itemref-loop>part of
-   an <code title=attr-itemref>itemref</code> loop</a>, then push
-   the first such element onto <var title="">pending</var>.</li>
+   each resulting token, <var title="">ID</var>, if there is an
+   element in the document with the <a href=#concept-id title=concept-ID>ID</a>
+   <var title="">ID</var>, then push the first such element onto <var title="">pending</var>.</li>
 
+   <li>
+
+    <p>For each element <var title="">candidate</var> in <var title="">pending</var>, run the following substeps:</p>
+
+    <ol><li><p>Let <var title="">scope</var> be <var title="">candidate</var>'s nearest ancestor element with an <code title=attr-itemscope><a href=#attr-itemscope>itemscope</a></code> attribute specified, if
+     any, or null otherwise.</li>
+
+     <li><p>If one of the other elements in <var title="">pending</var>
+     is also <var title="">candidate</var>, then remove <var title="">candidate</var> from <var title="">pending</var>
+     (i.e. remove duplicates).</li>
+
+     <li><p>Otherwise, if one of the other elements in <var title="">pending</var> is an ancestor element of <var title="">candidate</var>, and that element is <var title="">scope</var>, then remove <var title="">candidate</var>
+     from <var title="">pending</var> (since <var title="">candidate</var> will be reached anyway as part of
+     processing <var title="">scope</var>).</li>
+
+     <li><p>Otherwise, if one of the other elements in <var title="">pending</var> is an ancestor element of <var title="">candidate</var>, and either <var title="">scope</var> is
+     null or that element also has <var title="">scope</var> as its
+     nearest ancestor element with an <code title=attr-itemscope><a href=#attr-itemscope>itemscope</a></code> attribute specified, then
+     remove <var title="">candidate</var> from <var title="">pending</var> (since <var title="">candidate</var> will
+     be reached anyway as part of processing <var title="">scope</var>).</li>
+
+    </ol></li>
+
    <li><p>Sort <var title="">pending</var> in <a href=#tree-order>tree
    order</a>.</li>
 

Modified: source
===================================================================
--- source	2010-01-18 11:03:20 UTC (rev 4608)
+++ source	2010-01-18 11:08:58 UTC (rev 4609)
@@ -50665,65 +50665,8 @@
   each one, the element's nearest ancestor element with an <code
   title="attr-itemscope">itemscope</code> attribute specified, if any,
   must not be the element with the referencing <code
-  title="attr-itemref">itemref</code> attribute specified, and the
-  element must not be <span>part of an <code
-  title="attr-itemref">itemref</code> loop</span>.</p>
+  title="attr-itemref">itemref</code> attribute specified.</p>
 
-  <p>An element <var title="">e</var> is <dfn>part of an <code
-  title="attr-itemref">itemref</code> loop</dfn> if the following
-  algorithm terminates in a failure state:</p>
-
-  <ol>
-
-   <li><p>Let <var title="">visited</var> be an empty list.</p></li>
-
-   <li><p>Let <var title="">pending</var> be a list containing only
-   the element <var title="">e</var>.</p></li>
-
-   <li>
-
-    <p>While <var title="">pending</var> is not empty, run the
-    following substeps:</p>
-
-    <ol>
-
-     <li><p>Let <var title="">current</var> be an element in <var
-     title="">pending</var>, and remove that element from <var
-     title="">pending</var>.</p></li>
-
-     <li><p>If <var title="">current</var> is in <var
-     title="">visited</var>, terminate this algorithm in the failure
-     state.</p></li>
-
-     <li><p>Add <var title="">current</var> to <var
-     title="">visited</var>.</p></li>
-
-     <li><p>If <var title="">current</var> has an <code
-     title="attr-itemscope">itemscope</code> attribute but no <code
-     title="attr-itemprop">itemprop</code> attribute, and <var
-     title="">current</var> is not <var title="">e</var>, then skip
-     the remainder of these substeps for this value of <var
-     title="">current</var>.</p></li>
-
-     <li><p>If <var title="">current</var> has an <code
-     title="attr-itemscope">itemscope</code> attribute and an <code
-     title="attr-itemref">itemref</code> attribute, <span title="split
-     a string on spaces">split the value of that <code
-     title="attr-itemref">itemref</code> attribute on
-     spaces</span>. For each resulting token <var title="">ID</var>,
-     if there is an element in the document with the <span
-     title="concept-ID">ID</span> <var title="">ID</var>, then add the
-     first such element to <var title="">pending</var>.</p></li>
-
-     <li><p>Add all the children elements of <var
-     title="">current</var> to <var title="">pending</var>.</p></li>
-
-    </ol>
-
-   </li>
-
-  </ol>
-
   <p>The <code title="attr-itemref">itemref</code> attribute must not
   be specified on elements that do not have an <code
   title="attr-itemscope">itemscope</code> attribute specified.</p>
@@ -50937,12 +50880,6 @@
    <li><p>Let <var title="">root</var> be the element with the <code
    title="attr-itemscope">itemscope</code> attribute.</p></li>
 
-   <li><p>If <var title="">root</var> is <span>part of an <code
-   title="attr-itemref">itemref</code> loop</span>, then return an
-   empty list as the <span title="the properties of an
-   item">properties of the item</span> <var title="">root</var> and
-   abort these steps.</p></li>
-
    <li><p>Let <var title="">pending</var> be a stack of elements
    initially containing the child elements of <var
    title="">root</var>, if any. This list will be the one that holds
@@ -50957,12 +50894,51 @@
    title="attr-itemref">itemref</code> attribute, <span title="split a
    string on spaces">split the value of that <code
    title="attr-itemref">itemref</code> attribute on spaces</span>. For
-   each resulting token <var title="">ID</var>, if there is an element
-   in the document with the <span title="concept-ID">ID</span> <var
-   title="">ID</var> and the first such element is not <span>part of
-   an <code title="attr-itemref">itemref</code> loop</span>, then push
-   the first such element onto <var title="">pending</var>.</p></li>
+   each resulting token, <var title="">ID</var>, if there is an
+   element in the document with the <span title="concept-ID">ID</span>
+   <var title="">ID</var>, then push the first such element onto <var
+   title="">pending</var>.</p></li>
 
+   <li>
+
+    <p>For each element <var title="">candidate</var> in <var
+    title="">pending</var>, run the following substeps:</p>
+
+    <ol>
+
+     <li><p>Let <var title="">scope</var> be <var
+     title="">candidate</var>'s nearest ancestor element with an <code
+     title="attr-itemscope">itemscope</code> attribute specified, if
+     any, or null otherwise.</p></li>
+
+     <li><p>If one of the other elements in <var title="">pending</var>
+     is also <var title="">candidate</var>, then remove <var
+     title="">candidate</var> from <var title="">pending</var>
+     (i.e. remove duplicates).</p></li>
+
+     <li><p>Otherwise, if one of the other elements in <var
+     title="">pending</var> is an ancestor element of <var
+     title="">candidate</var>, and that element is <var
+     title="">scope</var>, then remove <var title="">candidate</var>
+     from <var title="">pending</var> (since <var
+     title="">candidate</var> will be reached anyway as part of
+     processing <var title="">scope</var>).</p></li>
+
+     <li><p>Otherwise, if one of the other elements in <var
+     title="">pending</var> is an ancestor element of <var
+     title="">candidate</var>, and either <var title="">scope</var> is
+     null or that element also has <var title="">scope</var> as its
+     nearest ancestor element with an <code
+     title="attr-itemscope">itemscope</code> attribute specified, then
+     remove <var title="">candidate</var> from <var
+     title="">pending</var> (since <var title="">candidate</var> will
+     be reached anyway as part of processing <var
+     title="">scope</var>).</p></li>
+
+    </ol>
+
+   </li>
+
    <li><p>Sort <var title="">pending</var> in <span>tree
    order</span>.</p></li>
 




More information about the Commit-Watchers mailing list