NOTE: The current preferred location for bug reports is the GitHub issue tracker.
Bug 145 - Move all <tfoot> elements to the bottom of the table.
Move all <tfoot> elements to the bottom of the table.
Status: RESOLVED INTENTIONAL
Product: Validator.nu
Classification: Unclassified
Component: HTML5 schema
HEAD
All All
: P2 normal
Assigned To: Henri Sivonen
http://svn.whatwg.org/webapps/source?...
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-03-23 12:10 CET by Nobody
Modified: 2008-04-21 10:46 CEST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nobody 2008-03-23 12:10:54 CET
Index: source
===================================================================
--- source	(revision 1379)
+++ source	(revision 1380)
@@ -17713,6 +17713,13 @@
    </li>
 
    <li>
+
+    <p>Let <var title="">pending <code>tfoot</code> elements</var> be
+    a list of <code>tfoot</code> elements, initially empty.</p>
+
+   </li>
+
+   <li>
     <p>Let <var title="">the table</var> be the <span
     title="concept-table">table</span> represented by the
     <code>table</code> element. The <var title="">x<sub
@@ -17724,6 +17731,11 @@
 
    <li>
 
+    <!-- this step is here just so that we can be sure to have a first
+    element in the next step, so that we can set up the "advance"
+    exception-handling thingy below; otherwise it'd be more
+    complicated. it's not a perf optimisation per se. -->
+
     <p>If the <code>table</code> element has no children elements,
     then return <var title="">the table</var> (which will be empty),
     and abort these steps.</p>
@@ -17739,8 +17751,8 @@
     title="">current element</var> to be <dfn
     title="concept-table-advance">advanced to the next child of the
     <code>table</code></dfn> when there is no such next child, then
-    the algorithm must be aborted at that point and the algorithm must
-    return <var title="">the table</var>.</p>
+    the user agent must jump to the step labelled <i>end</i>, near the
+    end of this algorithm.</p>
 
    </li>
 
@@ -17803,7 +17815,7 @@
 
      <li>
 
-      <p><em>Column groups.</em> Process the <var title="">current
+      <p><i>Column groups</i>: Process the <var title="">current
       element</var> according to the appropriate one of the following
       two cases:</p>
 
@@ -17836,8 +17848,8 @@
 
          <li>
 
-          <p><em>Columns.</em> If the <var title="">current
-          column</var> <code>col</code> element has a <code
+          <p><i>Columns</i>: If the <var title="">current column</var>
+          <code>col</code> element has a <code
           title="attr-col-span">span</code> attribute, then parse its
           value using the <span>rules for parsing non-negative
           integers</span>.</p>
@@ -17874,8 +17886,8 @@
           <code>col</code> element child of the <code>colgroup</code>
           element, then let the <var title="">current column</var> be
           the next <code>col</code> element child of the
-          <code>colgroup</code> element, and return to the third step
-          of this innermost group of steps (columns).</p>
+          <code>colgroup</code> element, and return to the step
+          labelled <i>columns</i>.</p>
 
          </li>
 
@@ -17981,8 +17993,8 @@
      <li>
 
       <p>If the <var title="">current element</var> is a
-      <code>colgroup</code> element, jump to step 1 in these substeps
-      (column groups).</p>
+      <code>colgroup</code> element, jump to the step labelled
+      <i>column groups</i> above.</p>
 
      </li>
 
@@ -18009,7 +18021,7 @@
 
    <li>
 
-    <p><em>Rows.</em> While the <var title="">current element</var> is
+    <p><i>Rows</i>: While the <var title="">current element</var> is
     not one of the following elements, <span
     title="concept-table-advance">advance</span> the <var
     title="">current element</var> to the next child of the
@@ -18028,18 +18040,78 @@
 
     <p>If the <var title="">current element</var> is a
     <code>tr</code>, then run the <span>algorithm for processing
-    rows</span> (defined below), then return to the previous step
-    (rows).</p>
+    rows</span>, <span title="concept-table-advance">advance</span>
+    the <var title="">current element</var> to the next child of the
+    <code>table</code>, and return to the step labelled
+    <i>rows</i>.</p>
+
+   </li>
+
+   <li>
+
+    <p>Run the <span>algorithm for ending a row group</span>.</p>
+
+   </li>
+
+   <li>
+
+    <p>If the <var title="">current element</var> is a
+    <code>tfoot</code>, then add that element to the list of <var
+    title="">pending <code>tfoot</code> elements</var>, <span
+    title="concept-table-advance">advance</span> the <var
+    title="">current element</var> to the next child of the
+    <code>table</code>, and return to the step labelled
+    <i>rows</i>.</p>
+
+   </li>
+
+   <li>
+
+    <p>The <var title="">current element</var> is either a
+    <code>thead</code> or a <code>tbody</code>.</p>
+
+    <p>Run the <span>algorithm for processing row groups</span>.</p>
+
+   </li>
+
+   <li>
+
+    <p><span title="concept-table-advance">Advance</span> the <var
+    title="">current element</var> to the next child of the
+    <code>table</code>.</p>
+
+   </li>
+
+   <li>
+
+    <p>Return to the step labelled <i>rows</i>.</p>
+
+   </li>
+
+   <li>
+
+    <p><i>End</i>: For each <code>tfoot</code> element in the list of
+    <var title="">pending <code>tfoot</code> elements</var>, in tree
+    order, run the <span>algorithm for processing row
+    groups</span>.</p>
 
    </li>
 
    <li>
 
-    <p>Otherwise, run the <span>algorithm for ending a row
-    group</span>.</p>
+    <p>Return <var title="">the table</var>.</p>
 
    </li>
 
+  </ol>
+
+  <p>The <dfn>algorithm for processing row groups</dfn>, which is
+  invoked by the set of steps above for processing
+  <tcode>thead</code>, <code>tbody</code>, and <code>tfoot</code>
+  elements, is:</p>
+
+  <ol>
+
    <li>
 
     <p>Let <var title="">y<sub title="">start</sub></var> have the
@@ -18049,9 +18121,9 @@
 
    <li>
 
-    <p>For each <code>tr</code> element that is a child of the <var
-    title="">current element</var>, in tree order, run the
-    <span>algorithm for processing rows</span> (defined below).</p>
+    <p>For each <code>tr</code> element that is a child of the element
+    being processed, in tree order, run the <span>algorithm for
+    processing rows</span>.</p>
 
    </li>
 
@@ -18076,20 +18148,12 @@
 
    <li>
 
-    <p>Run the <span>algorithm for ending a row group</span>
-    again.</p>
-
-   </li>
-
-   <li>
-
-    <p>Return to step 12 (rows).</p>
+    <p>Run the <span>algorithm for ending a row group</span>.</p>
 
    </li>
 
   </ol>
 
-
   <p>The <dfn>algorithm for ending a row group</dfn>, which is invoked
   by the set of steps above when starting and ending a block of rows,
   is:</p>
@@ -18180,13 +18244,13 @@
 
    <li>
 
-    <p><em>Cells.</em> While <var title="">x<sub
-    title="">current</sub></var> is less than <var
-    title="">x<sub title="">width</sub></var> and the slot with
-    coordinate (<var title="">x<sub title="">current</sub></var>, <var
-    title="">y<sub title="">current</sub></var>) already has a cell
-    assigned to it, increase <var title="">x<sub
-    title="">current</sub></var> by 1.</p>
+    <p><i>Cells</i>: While <var title="">x<sub
+    title="">current</sub></var> is less than <var title="">x<sub
+    title="">width</sub></var> and the slot with coordinate (<var
+    title="">x<sub title="">current</sub></var>, <var title="">y<sub
+    title="">current</sub></var>) already has a cell assigned to it,
+    increase <var title="">x<sub title="">current</sub></var> by
+    1.</p>
 
    </li>