[html5] r1380 - /

whatwg at whatwg.org whatwg at whatwg.org
Sat Mar 22 19:55:45 PDT 2008


Author: ianh
Date: 2008-03-22 19:55:44 -0700 (Sat, 22 Mar 2008)
New Revision: 1380

Modified:
   index
   source
Log:
[act] (0) Move all <tfoot> elements to the bottom of the table.

Modified: index
===================================================================
--- index	2008-03-22 07:56:34 UTC (rev 1379)
+++ index	2008-03-23 02:55:44 UTC (rev 1380)
@@ -24,7 +24,7 @@
 
    <h1 id=html-5>HTML 5</h1>
 
-   <h2 class="no-num no-toc" id=working>Working Draft — 22 March 2008</h2>
+   <h2 class="no-num no-toc" id=working>Working Draft — 23 March 2008</h2>
 
    <p>You can take part in this work. <a
     href="http://www.whatwg.org/mailing-list">Join the working group's
@@ -19943,7 +19943,7 @@
    href="#table0">table model</a>).
 
   <p>The exact effect of the attribute is described in detail in the <a
-   href="#algorithm2">algorithm for assigning header cells to data cells</a>,
+   href="#algorithm3">algorithm for assigning header cells to data cells</a>,
    which user agents must apply to determine the relationships between data
    cells and header cells.
 
@@ -20035,7 +20035,7 @@
    attribute's <em>missing value default</em> is the <em>auto</em> state.
 
   <p>The exact effect of these values is described in detail in the <a
-   href="#algorithm2">algorithm for assigning header cells to data cells</a>,
+   href="#algorithm3">algorithm for assigning header cells to data cells</a>,
    which user agents must apply to determine the relationships between data
    cells and header cells.
 
@@ -20219,6 +20219,11 @@
     <p>Let <var title="">y<sub title="">height</sub></var> be zero.</p>
 
    <li>
+    <p>Let <var title="">pending <code><a href="#tfoot0">tfoot</a></code>
+     elements</var> be a list of <code><a href="#tfoot0">tfoot</a></code>
+     elements, initially empty.</p>
+
+   <li>
     <p>Let <var title="">the table</var> be the <a href="#table1"
      title=concept-table>table</a> represented by the <code><a
      href="#table">table</a></code> element. The <var title="">x<sub
@@ -20227,7 +20232,11 @@
      table</var>'s dimensions. <var title="">The table</var> is initially
      empty.</p>
 
-   <li>
+   <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><a href="#table">table</a></code> element has no children
      elements, then return <var title="">the table</var> (which will be
      empty), and abort these steps.</p>
@@ -20239,9 +20248,9 @@
     <p>If a step in this algorithm ever requires the <var title="">current
      element</var> to be <dfn id=advanced
      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>
+     <code>table</code></dfn> when there is no such next child, then the user
+     agent must jump to the step labelled <i>end</i>, near the end of this
+     algorithm.</p>
 
    <li>
     <p>While the <var title="">current element</var> is not one of the
@@ -20300,7 +20309,7 @@
 
     <ol>
      <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>
 
@@ -20323,7 +20332,7 @@
            href="#colgroup">colgroup</a></code> element.</p>
 
          <li>
-          <p><em>Columns.</em> If the <var title="">current column</var>
+          <p><i>Columns</i>: If the <var title="">current column</var>
            <code><a href="#col">col</a></code> element has a <code
            title=attr-col-span><a href="#span2">span</a></code> attribute,
            then parse its value using the <a href="#rules">rules for parsing
@@ -20354,7 +20363,7 @@
            title="">current column</var> be the next <code><a
            href="#col">col</a></code> element child of the <code><a
            href="#colgroup">colgroup</a></code> element, and return to the
-           third step of this innermost group of steps (columns).</p>
+           step labelled <i>columns</i>.</p>
 
          <li>
           <p>Let all the last <a href="#column"
@@ -20430,8 +20439,8 @@
 
      <li>
       <p>If the <var title="">current element</var> is a <code><a
-       href="#colgroup">colgroup</a></code> element, jump to step 1 in these
-       substeps (column groups).</p>
+       href="#colgroup">colgroup</a></code> element, jump to the step
+       labelled <i>column groups</i> above.</p>
     </ol>
 
    <li>
@@ -20446,8 +20455,8 @@
      list.</p>
 
    <li>
-    <p><em>Rows.</em> While the <var title="">current element</var> is not
-     one of the following elements, <a href="#advanced"
+    <p><i>Rows</i>: While the <var title="">current element</var> is not one
+     of the following elements, <a href="#advanced"
      title=concept-table-advance>advance</a> the <var title="">current
      element</var> to the next child of the <code><a
      href="#table">table</a></code>:</p>
@@ -20464,22 +20473,65 @@
 
    <li>
     <p>If the <var title="">current element</var> is a <code><a
-     href="#tr">tr</a></code>, then run the <a href="#algorithm0">algorithm
-     for processing rows</a> (defined below), then return to the previous
-     step (rows).</p>
+     href="#tr">tr</a></code>, then run the <a href="#algorithm1">algorithm
+     for processing rows</a>, <a href="#advanced"
+     title=concept-table-advance>advance</a> the <var title="">current
+     element</var> to the next child of the <code><a
+     href="#table">table</a></code>, and return to the step labelled
+     <i>rows</i>.</p>
 
    <li>
-    <p>Otherwise, run the <a href="#algorithm">algorithm for ending a row
-     group</a>.</p>
+    <p>Run the <a href="#algorithm0">algorithm for ending a row group</a>.</p>
 
    <li>
+    <p>If the <var title="">current element</var> is a <code><a
+     href="#tfoot0">tfoot</a></code>, then add that element to the list of
+     <var title="">pending <code><a href="#tfoot0">tfoot</a></code>
+     elements</var>, <a href="#advanced"
+     title=concept-table-advance>advance</a> the <var title="">current
+     element</var> to the next child of the <code><a
+     href="#table">table</a></code>, and return to the step labelled
+     <i>rows</i>.</p>
+
+   <li>
+    <p>The <var title="">current element</var> is either a <code><a
+     href="#thead0">thead</a></code> or a <code><a
+     href="#tbody">tbody</a></code>.</p>
+
+    <p>Run the <a href="#algorithm">algorithm for processing row groups</a>.</p>
+
+   <li>
+    <p><a href="#advanced" title=concept-table-advance>Advance</a> the <var
+     title="">current element</var> to the next child of the <code><a
+     href="#table">table</a></code>.</p>
+
+   <li>
+    <p>Return to the step labelled <i>rows</i>.</p>
+
+   <li>
+    <p><i>End</i>: For each <code><a href="#tfoot0">tfoot</a></code> element
+     in the list of <var title="">pending <code><a
+     href="#tfoot0">tfoot</a></code> elements</var>, in tree order, run the
+     <a href="#algorithm">algorithm for processing row groups</a>.</p>
+
+   <li>
+    <p>Return <var title="">the table</var>.</p>
+  </ol>
+
+  <p>The <dfn id=algorithm>algorithm for processing row groups</dfn>, which
+   is invoked by the set of steps above for processing <tcode>thead, <code><a
+   href="#tbody">tbody</a></code>, and <code><a
+   href="#tfoot0">tfoot</a></code> elements, is:</tcode>
+
+  <ol>
+   <li>
     <p>Let <var title="">y<sub title="">start</sub></var> have the value of
      <var title="">y<sub title="">height</sub></var>.</p>
 
    <li>
     <p>For each <code><a href="#tr">tr</a></code> element that is a child of
-     the <var title="">current element</var>, in tree order, run the <a
-     href="#algorithm0">algorithm for processing rows</a> (defined below).</p>
+     the element being processed, in tree order, run the <a
+     href="#algorithm1">algorithm for processing rows</a>.</p>
 
    <li> <!-- if we added any rows, make them part of a row group -->
     <p>If <span><var title="">y<sub
@@ -20496,14 +20548,10 @@
      title="">current element</var>.</p>
 
    <li>
-    <p>Run the <a href="#algorithm">algorithm for ending a row group</a>
-     again.</p>
-
-   <li>
-    <p>Return to step 12 (rows).</p>
+    <p>Run the <a href="#algorithm0">algorithm for ending a row group</a>.</p>
   </ol>
 
-  <p>The <dfn id=algorithm>algorithm for ending a row group</dfn>, which is
+  <p>The <dfn id=algorithm0>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:
 
@@ -20519,7 +20567,7 @@
 
     <ol>
      <li>
-      <p>Run the <a href="#algorithm1">algorithm for growing downward-growing
+      <p>Run the <a href="#algorithm2">algorithm for growing downward-growing
        cells</a>.</p>
 
      <li>
@@ -20530,7 +20578,7 @@
     <p>Empty the <var title="">list of downward-growing cells</var>.</p>
   </ol>
 
-  <p>The <dfn id=algorithm0>algorithm for processing rows</dfn>, which is
+  <p>The <dfn id=algorithm1>algorithm for processing rows</dfn>, which is
    invoked by the set of steps above for processing <code><a
    href="#tr">tr</a></code> elements, is:
 
@@ -20551,11 +20599,11 @@
      the <code><a href="#tr">tr</a></code> element being processed.</p>
 
    <li>
-    <p>Run the <a href="#algorithm1">algorithm for growing downward-growing
+    <p>Run the <a href="#algorithm2">algorithm for growing downward-growing
      cells</a>.</p>
 
    <li>
-    <p><em>Cells.</em> While <var title="">x<sub title="">current</sub></var>
+    <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
@@ -20628,7 +20676,7 @@
      href="#th">th</a></code> element, let this new cell <var
      title="">c</var> be a header cell; otherwise, let it be a data cell. To
      establish what header cells apply to a data cell, use the <a
-     href="#algorithm2">algorithm for assigning header cells to data
+     href="#algorithm3">algorithm for assigning header cells to data
      cells</a> described in the next section.</p>
 
     <p>If any of the slots involved already had a <a href="#cell"
@@ -20663,7 +20711,7 @@
   </ol>
 
   <p>When the algorithms above require the user agent to run the <dfn
-   id=algorithm1>algorithm for growing downward-growing cells</dfn>, the user
+   id=algorithm2>algorithm for growing downward-growing cells</dfn>, the user
    agent must, for each {<var title="">cell</var>, <var title="">cell<sub
    title="">x</sub></var>, <var title="">width</var>} tuple in the <var
    title="">list of downward-growing cells</var>, if any, extend the <a
@@ -20685,7 +20733,7 @@
    </span>Forming relationships between data cells and header cells</h5>
 
   <p>Each data cell can be assigned zero or more header cells. The <dfn
-   id=algorithm2>algorithm for assigning header cells to data cells</dfn> is
+   id=algorithm3>algorithm for assigning header cells to data cells</dfn> is
    as follows.
 
   <ol>
@@ -30915,7 +30963,7 @@
   <p>For resources fetched over most other protocols, e.g. FTP, there is no
    type information.
 
-  <p>The <dfn id=algorithm3>algorithm for extracting an encoding from a
+  <p>The <dfn id=algorithm4>algorithm for extracting an encoding from a
    Content-Type</dfn>, given a string <var title="">s</var>, is as follows.
    It either returns an encoding or nothing.
 
@@ -38790,7 +38838,7 @@
          <li>
           <p>Otherwise, the attribute's name is "<code
            title="">content</code>": apply the <a
-           href="#algorithm3">algorithm for extracting an encoding from a
+           href="#algorithm4">algorithm for extracting an encoding from a
            Content-Type</a>, giving the attribute's value as the string to
            parse. If an encoding is returned, let <var title="">charset</var>
            be that encoding. Otherwise, return to step 2 in these inner
@@ -42129,7 +42177,7 @@
 
     <p>Otherwise, if the element has a <code title=attr-meta-charset><a
      href="#charset0">content</a></code> attribute, and applying the <a
-     href="#algorithm3">algorithm for extracting an encoding from a
+     href="#algorithm4">algorithm for extracting an encoding from a
      Content-Type</a> to its value returns a supported encoding <var
      title="">encoding</var>, and the <a href="#confidence"
      title=concept-encoding-confidence>confidence</a> is currently

Modified: source
===================================================================
--- source	2008-03-22 07:56:34 UTC (rev 1379)
+++ source	2008-03-23 02:55:44 UTC (rev 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,20 +18040,80 @@
 
     <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>Otherwise, run the <span>algorithm for ending a row
-    group</span>.</p>
+    <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>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
     value of <var title="">y<sub title="">height</sub></var>.</p>
 
@@ -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>
+    <p>Run the <span>algorithm for ending a row group</span>.</p>
 
    </li>
 
-   <li>
-
-    <p>Return to step 12 (rows).</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>
 




More information about the Commit-Watchers mailing list