[html5] r8531 - [cgiowt] (3) PARSER CHANGE: Change the Adoption Agency Algorithm so that it only [...]

whatwg at whatwg.org whatwg at whatwg.org
Thu Mar 6 11:48:45 PST 2014


Author: ianh
Date: 2014-03-06 11:48:44 -0800 (Thu, 06 Mar 2014)
New Revision: 8531

Modified:
   complete.html
   index
   source
Log:
[cgiowt] (3) PARSER CHANGE: Change the Adoption Agency Algorithm so that it only pops the current element if it's not on the list of formatting elements, since otherwise we can end up with close tags closing things out of order even when they're all there.
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=24833
Affected topics: HTML Syntax and Parsing

Modified: complete.html
===================================================================
--- complete.html	2014-03-06 19:20:59 UTC (rev 8530)
+++ complete.html	2014-03-06 19:48:44 UTC (rev 8531)
@@ -92348,22 +92348,11 @@
   a tag name <var title="">subject</var> for which the algorithm is being run, consists of the
   following steps:</p>
 
-  <ol><!-- don't forget about the noah's ark clause when looking at this algorithm! --><li>
+  <ol><!-- don't forget about the noah's ark clause when looking at this algorithm! --><li><p>If the <a href=#current-node>current node</a> is an <a href=#html-elements title="HTML elements">HTML element</a>
+   whose tag name is <var title="">subject</var>, and the <a href=#current-node>current node</a> is not in the
+   <a href=#list-of-active-formatting-elements>list of active formatting elements</a>, then pop the <a href=#current-node>current node</a> off the
+   <a href=#stack-of-open-elements>stack of open elements</a>, and abort these steps.</li>
 
-    <p>If the <a href=#current-node>current node</a> is an <a href=#html-elements title="HTML elements">HTML element</a> whose
-    tag name is <var title="">subject</var>, then run these substeps:
-
-    <ol><li><p>Let <var title="">element</var> be the <a href=#current-node>current node</a>.</li>
-
-     <li><p>Pop <var title="">element</var> off the <a href=#stack-of-open-elements>stack of open elements</a>.</li>
-
-     <li><p>If <var title="">element</var> is also in the <a href=#list-of-active-formatting-elements>list of active formatting
-     elements</a>, remove the element from the list.</li>
-
-     <li><p>Abort the <a href=#adoption-agency-algorithm>adoption agency algorithm</a>.</li>
-
-    </ol></li>
-
    <li><p>Let <var title="">outer loop counter</var> be zero.</li>
 
    <li><p><i>Outer loop</i>: If <var title="">outer loop counter</var> is greater than or equal to

Modified: index
===================================================================
--- index	2014-03-06 19:20:59 UTC (rev 8530)
+++ index	2014-03-06 19:48:44 UTC (rev 8531)
@@ -92348,22 +92348,11 @@
   a tag name <var title="">subject</var> for which the algorithm is being run, consists of the
   following steps:</p>
 
-  <ol><!-- don't forget about the noah's ark clause when looking at this algorithm! --><li>
+  <ol><!-- don't forget about the noah's ark clause when looking at this algorithm! --><li><p>If the <a href=#current-node>current node</a> is an <a href=#html-elements title="HTML elements">HTML element</a>
+   whose tag name is <var title="">subject</var>, and the <a href=#current-node>current node</a> is not in the
+   <a href=#list-of-active-formatting-elements>list of active formatting elements</a>, then pop the <a href=#current-node>current node</a> off the
+   <a href=#stack-of-open-elements>stack of open elements</a>, and abort these steps.</li>
 
-    <p>If the <a href=#current-node>current node</a> is an <a href=#html-elements title="HTML elements">HTML element</a> whose
-    tag name is <var title="">subject</var>, then run these substeps:
-
-    <ol><li><p>Let <var title="">element</var> be the <a href=#current-node>current node</a>.</li>
-
-     <li><p>Pop <var title="">element</var> off the <a href=#stack-of-open-elements>stack of open elements</a>.</li>
-
-     <li><p>If <var title="">element</var> is also in the <a href=#list-of-active-formatting-elements>list of active formatting
-     elements</a>, remove the element from the list.</li>
-
-     <li><p>Abort the <a href=#adoption-agency-algorithm>adoption agency algorithm</a>.</li>
-
-    </ol></li>
-
    <li><p>Let <var title="">outer loop counter</var> be zero.</li>
 
    <li><p><i>Outer loop</i>: If <var title="">outer loop counter</var> is greater than or equal to

Modified: source
===================================================================
--- source	2014-03-06 19:20:59 UTC (rev 8530)
+++ source	2014-03-06 19:48:44 UTC (rev 8531)
@@ -103021,26 +103021,11 @@
 
    <!-- don't forget about the noah's ark clause when looking at this algorithm! -->
 
-   <li>
+   <li><p>If the <span>current node</span> is an <span data-x="HTML elements">HTML element</span>
+   whose tag name is <var data-x="">subject</var>, and the <span>current node</span> is not in the
+   <span>list of active formatting elements</span>, then pop the <span>current node</span> off the
+   <span>stack of open elements</span>, and abort these steps.</p></li>
 
-    <p>If the <span>current node</span> is an <span data-x="HTML elements">HTML element</span> whose
-    tag name is <var data-x="">subject</var>, then run these substeps:
-
-    <ol>
-
-     <li><p>Let <var data-x="">element</var> be the <span>current node</span>.</p></li>
-
-     <li><p>Pop <var data-x="">element</var> off the <span>stack of open elements</span>.</p></li>
-
-     <li><p>If <var data-x="">element</var> is also in the <span>list of active formatting
-     elements</span>, remove the element from the list.</p></li>
-
-     <li><p>Abort the <span>adoption agency algorithm</span>.</p></li>
-
-    </ol>
-
-   </li>
-
    <li><p>Let <var data-x="">outer loop counter</var> be zero.</p></li>
 
    <li><p><i>Outer loop</i>: If <var data-x="">outer loop counter</var> is greater than or equal to




More information about the Commit-Watchers mailing list