hixie: Change how space characters are handled in tables. Removes 'taint' concept, but adds an insertion mode (that I expect nobody will really implement that way, since the best way to code this is to have string tokens, not character tokens). (whatwg r3382)

hixie: Change how space characters are handled in tables. Removes
'taint' concept, but adds an insertion mode (that I expect nobody will
really implement that way, since the best way to code this is to have
string tokens, not character tokens). (whatwg r3382)

http://dev.w3.org/cvsweb/html5/spec/Overview.html?r1=1.2513&r2=1.2514&f=h
http://html5.org/tools/web-apps-tracker?from=3381&to=3382

===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.2513
retrieving revision 1.2514
diff -u -d -r1.2513 -r1.2514
--- Overview.html 8 Jul 2009 19:42:14 -0000 1.2513
+++ Overview.html 10 Jul 2009 00:35:48 -0000 1.2514
@@ -174,7 +174,7 @@
    <h2 class="no-num no-toc" id="a-vocabulary-and-associated-apis-for-html-and-xhtml">A vocabulary and associated APIs for HTML and XHTML</h2>
    <!--ZZZ:-->
    <!--<h2 class="no-num no-toc">W3C Working Draft 23 April 2009</h2>-->
-   <h2 class="no-num no-toc" id="editor-s-draft-date-1-january-1970">Editor's Draft 8 July 2009</h2>
+   <h2 class="no-num no-toc" id="editor-s-draft-date-1-january-1970">Editor's Draft 10 July 2009</h2>
    <!--:ZZZ-->
    <dl><!-- ZZZ: update the month/day (twice), (un)comment out
     <dt>This Version:</dt>
@@ -267,7 +267,7 @@
   track.
   <!--ZZZ:-->
   <!--This specification is the 23 April 2009 Working Draft.-->
-  This specification is the 8 July 2009 Editor's Draft.
+  This specification is the 10 July 2009 Editor's Draft.
   <!--:ZZZ-->
   </p><!-- UNDER NO CIRCUMSTANCES IS THE PRECEDING PARAGRAPH TO BE REMOVED OR EDITED WITHOUT TALKING TO IAN FIRST --><!-- relationship to other work (required) --><p>This specification is also being produced by the <a href="http://www.whatwg.org/">WHATWG</a>. The two specifications are
   identical from the table of contents onwards.</p><!-- UNDER NO CIRCUMSTANCES IS THE FOLLOWING PARAGRAPH TO BE REMOVED OR EDITED WITHOUT TALKING TO IAN FIRST --><!-- UNDER NO CIRCUMSTANCES IS THE PRECEDING PARAGRAPH TO BE REMOVED OR EDITED WITHOUT TALKING TO IAN FIRST --><!-- context and rationale (required) --><p>This specification is intended to replace (be a new version of)
@@ -1066,19 +1066,20 @@
        <li><a href="#parsing-main-inbody"><span class="secno">9.2.5.10 </span>The "in body" insertion mode</a></li>
        <li><a href="#parsing-main-incdata"><span class="secno">9.2.5.11 </span>The "in CDATA/RCDATA" insertion mode</a></li>
        <li><a href="#parsing-main-intable"><span class="secno">9.2.5.12 </span>The "in table" insertion mode</a></li>
-       <li><a href="#parsing-main-incaption"><span class="secno">9.2.5.13 </span>The "in caption" insertion mode</a></li>
-       <li><a href="#parsing-main-incolgroup"><span class="secno">9.2.5.14 </span>The "in column group" insertion mode</a></li>
-       <li><a href="#parsing-main-intbody"><span class="secno">9.2.5.15 </span>The "in table body" insertion mode</a></li>
-       <li><a href="#parsing-main-intr"><span class="secno">9.2.5.16 </span>The "in row" insertion mode</a></li>
-       <li><a href="#parsing-main-intd"><span class="secno">9.2.5.17 </span>The "in cell" insertion mode</a></li>
-       <li><a href="#parsing-main-inselect"><span class="secno">9.2.5.18 </span>The "in select" insertion mode</a></li>
-       <li><a href="#parsing-main-inselectintable"><span class="secno">9.2.5.19 </span>The "in select in table" insertion mode</a></li>
-       <li><a href="#parsing-main-inforeign"><span class="secno">9.2.5.20 </span>The "in foreign content" insertion mode</a></li>
-       <li><a href="#parsing-main-afterbody"><span class="secno">9.2.5.21 </span>The "after body" insertion mode</a></li>
-       <li><a href="#parsing-main-inframeset"><span class="secno">9.2.5.22 </span>The "in frameset" insertion mode</a></li>
-       <li><a href="#parsing-main-afterframeset"><span class="secno">9.2.5.23 </span>The "after frameset" insertion mode</a></li>
-       <li><a href="#the-after-after-body-insertion-mode"><span class="secno">9.2.5.24 </span>The "after after body" insertion mode</a></li>
-       <li><a href="#the-after-after-frameset-insertion-mode"><span class="secno">9.2.5.25 </span>The "after after frameset" insertion mode</a></ol></li>
+       <li><a href="#parsing-main-intabletext"><span class="secno">9.2.5.13 </span>The "in table text" insertion mode</a></li>
+       <li><a href="#parsing-main-incaption"><span class="secno">9.2.5.14 </span>The "in caption" insertion mode</a></li>
+       <li><a href="#parsing-main-incolgroup"><span class="secno">9.2.5.15 </span>The "in column group" insertion mode</a></li>
+       <li><a href="#parsing-main-intbody"><span class="secno">9.2.5.16 </span>The "in table body" insertion mode</a></li>
+       <li><a href="#parsing-main-intr"><span class="secno">9.2.5.17 </span>The "in row" insertion mode</a></li>
+       <li><a href="#parsing-main-intd"><span class="secno">9.2.5.18 </span>The "in cell" insertion mode</a></li>
+       <li><a href="#parsing-main-inselect"><span class="secno">9.2.5.19 </span>The "in select" insertion mode</a></li>
+       <li><a href="#parsing-main-inselectintable"><span class="secno">9.2.5.20 </span>The "in select in table" insertion mode</a></li>
+       <li><a href="#parsing-main-inforeign"><span class="secno">9.2.5.21 </span>The "in foreign content" insertion mode</a></li>
+       <li><a href="#parsing-main-afterbody"><span class="secno">9.2.5.22 </span>The "after body" insertion mode</a></li>
+       <li><a href="#parsing-main-inframeset"><span class="secno">9.2.5.23 </span>The "in frameset" insertion mode</a></li>
+       <li><a href="#parsing-main-afterframeset"><span class="secno">9.2.5.24 </span>The "after frameset" insertion mode</a></li>
+       <li><a href="#the-after-after-body-insertion-mode"><span class="secno">9.2.5.25 </span>The "after after body" insertion mode</a></li>
+       <li><a href="#the-after-after-frameset-insertion-mode"><span class="secno">9.2.5.26 </span>The "after after frameset" insertion mode</a></ol></li>
      <li><a href="#the-end"><span class="secno">9.2.6 </span>The end</a></li>
      <li><a href="#coercing-an-html-dom-into-an-infoset"><span class="secno">9.2.7 </span>Coercing an HTML DOM into an infoset</a></li>
      <li><a href="#an-introduction-to-error-handling-in-the-parser"><span class="secno">9.2.8 </span>An introduction to error handling in the parser</a>
@@ -52978,7 +52979,7 @@
   "<a href="#the-before-head-insertion-mode" title="insertion mode: before head">before head</a>",
   "<a href="#parsing-main-inhead" title="insertion mode: in head">in head</a>", "<a href="#parsing-main-inheadnoscript" title="insertion mode: in head noscript">in head noscript</a>",
   "<a href="#the-after-head-insertion-mode" title="insertion mode: after head">after head</a>", "<a href="#parsing-main-inbody" title="insertion mode: in body">in body</a>", "<a href="#parsing-main-incdata" title="insertion mode: in CDATA/RCDATA">in CDATA/RCDATA</a>",
-  "<a href="#parsing-main-intable" title="insertion mode: in table">in table</a>", "<a href="#parsing-main-incaption" title="insertion mode: in caption">in caption</a>", "<a href="#parsing-main-incolgroup" title="insertion mode: in column group">in column group</a>",
+  "<a href="#parsing-main-intable" title="insertion mode: in table">in table</a>", "<a href="#parsing-main-intabletext" title="insertion mode: in table text">in table text</a>", "<a href="#parsing-main-incaption" title="insertion mode: in caption">in caption</a>", "<a href="#parsing-main-incolgroup" title="insertion mode: in column group">in column group</a>",
   "<a href="#parsing-main-intbody" title="insertion mode: in table body">in table body</a>",
   "<a href="#parsing-main-intr" title="insertion mode: in row">in row</a>", "<a href="#parsing-main-intd" title="insertion mode: in cell">in cell</a>", "<a href="#parsing-main-inselect" title="insertion mode: in select">in select</a>", "<a href="#parsing-main-inselectintable" title="insertion mode: in select in table">in select in
   table</a>", "<a href="#parsing-main-inforeign" title="insertion mode: in foreign content">in
@@ -52994,8 +52995,7 @@
 
   <p>Seven of these modes, namely "<a href="#parsing-main-inhead" title="insertion mode: in
   head">in head</a>", "<a href="#parsing-main-inbody" title="insertion mode: in body">in
-  body</a>", "<a href="#parsing-main-incdata" title="insertion mode: in CDATA/RCDATA">in
-  CDATA/RCDATA</a>", "<a href="#parsing-main-intable" title="insertion mode: in table">in
+  body</a>", "<a href="#parsing-main-intable" title="insertion mode: in table">in
   table</a>", "<a href="#parsing-main-intbody" title="insertion mode: in table body">in table
   body</a>", "<a href="#parsing-main-intr" title="insertion mode: in row">in row</a>",
   "<a href="#parsing-main-intd" title="insertion mode: in cell">in cell</a>", and "<a href="#parsing-main-inselect" title="insertion mode: in select">in select</a>", are special, in
@@ -53009,10 +53009,9 @@
   to a new value.</p>
 
   <p>When the insertion mode is switched to "<a href="#parsing-main-incdata" title="insertion
-  mode: in CDATA/RCDATA">in CDATA/RCDATA</a>", the <dfn id="original-insertion-mode">original
-  insertion mode</dfn> is also set. This is the insertion mode to
-  which the tree construction stage will return when the corresponding
-  end tag is parsed.</p>
+  mode: in CDATA/RCDATA">in CDATA/RCDATA</a>" or "<a href="#parsing-main-intabletext" title="insertion mode: in table text">in table text</a>", the
+  <dfn id="original-insertion-mode">original insertion mode</dfn> is also set. This is the
+  insertion mode to which the tree construction stage will return.</p>
 
   <p>When the insertion mode is switched to "<a href="#parsing-main-inforeign" title="insertion
   mode: in foreign content">in foreign content</a>", the
@@ -54832,7 +54831,9 @@
      <tr><td><pre>A&lt;table&gt;B&lt;tr&gt;C&lt;/tr&gt;C&lt;/table&gt;</pre>
       <td>Three adjacent text nodes before the table, containing "A", "B", and "CC" respectively. (This is caused by <a href="#foster-parent" title="foster parent">foster parenting</a>.)
      <tr><td><pre>A&lt;table&gt;&lt;tr&gt;&nbsp;B&lt;/tr&gt;&nbsp;B&lt;/table&gt;</pre>
-      <td>Two adjacent text nodes before the table, containing "A" and "B&nbsp;B" respectively, and one text node inside the table with a single space character. (This is caused by <a href="#foster-parent" title="foster parent">foster parenting</a> and <a href="#tainted" title="tainted">tainting</a>.)
+      <td>Two adjacent text nodes before the table, containing "A" and "&nbsp;B&nbsp;B" (space-B-space-B) respectively. (This is caused by <a href="#foster-parent" title="foster parent">foster parenting</a>.)
+     <tr><td><pre>A&lt;table&gt;&lt;tr&gt;&nbsp;B&lt;/tr&gt;&nbsp;&lt;/em&gt;C&lt;/table&gt;</pre>
+      <td>Three adjacent text nodes before the table, containing "A", "&nbsp;B" (space-B), and "C" respectively, and one text node inside the table (as a child of a <code><a href="#the-tbody-element">tbody</a></code>) with a single space character. (Space characters separated from non-space characters by non-character tokens are not affected by <a href="#foster-parent" title="foster parent">foster parenting</a>, even if those other tokens then get ignored.)
    </table></div>
 
   <p id="mutation-during-parsing">DOM mutation events must not fire
@@ -55056,12 +55057,7 @@
 
   <p>When a node <var title="">node</var> is to be <dfn id="foster-parent" title="foster
   parent">foster parented</dfn>, the node <var title="">node</var>
-  must be inserted into the <i><a href="#foster-parent-element">foster parent element</a></i>, and the
-  <a href="#current-table">current table</a> must be marked as
-  <dfn id="tainted">tainted</dfn>. (Once the <a href="#current-table">current table</a> has been
-  <a href="#tainted">tainted</a>, <a href="#space-character" title="space character">space
-  characters</a> are inserted into the <i><a href="#foster-parent-element">foster parent element</a></i>
-  instead of the <a href="#current-node">current node</a>.)</p>
+  must be inserted into the <i><a href="#foster-parent-element">foster parent element</a></i>.</p>
 
   <p>The <dfn id="foster-parent-element">foster parent element</dfn> is the parent element of the
   last <code><a href="#the-table-element">table</a></code> element in the <a href="#stack-of-open-elements">stack of open
@@ -57064,16 +57060,17 @@
   <p>When the <a href="#insertion-mode">insertion mode</a> is "<a href="#parsing-main-intable" title="insertion
   mode: in table">in table</a>", tokens must be handled as follows:</p>
 
-  <dl class="switch"><dt>A character token that is one of U+0009 CHARACTER
-   TABULATION, U+000A LINE FEED (LF), U+000C FORM FEED (FF),
-   <!--U+000D CARRIAGE RETURN (CR),--> or U+0020 SPACE</dt>
+  <dl class="switch"><dt>A character token</dt>
    <dd>
 
-    <p>If the <a href="#current-table">current table</a> is <a href="#tainted">tainted</a>, then
-    act as described in the "anything else" entry below.</p>
+     <p>Let the <dfn id="pending-table-character-tokens"><var>pending table character tokens</var></dfn>
+     be an empty list of tokens.</p>
 
-    <p>Otherwise, <a href="#insert-a-character" title="insert a character">insert the
-    character</a> into the <a href="#current-node">current node</a>.</p>
+     <p>Let the <a href="#original-insertion-mode">original insertion mode</a> be the current
+     <a href="#insertion-mode">insertion mode</a>.</p>
+
+     <p>Switch the <a href="#insertion-mode">insertion mode</a> to "<a href="#parsing-main-intabletext" title="insertion mode: in table text">in table text</a>" and
+     reprocess the token.</p>
 
    </dd>
 
@@ -57240,7 +57237,43 @@
   case</a>.</p>
 
 
-  <h5 id="parsing-main-incaption"><span class="secno">9.2.5.13 </span>The "<dfn title="insertion mode: in caption">in caption</dfn>" insertion mode</h5>
+
+  <h5 id="parsing-main-intabletext"><span class="secno">9.2.5.13 </span>The "<dfn title="insertion mode: in table text">in table text</dfn>" insertion mode</h5>
+
+  <p>When the <a href="#insertion-mode">insertion mode</a> is "<a href="#parsing-main-intabletext" title="insertion
+  mode: in table text">in table text</a>", tokens must be handled
+  as follows:</p>
+
+  <dl class="switch"><dt>A character token</dt>
+   <dd>
+
+    <p>Append the character token to the <var><a href="#pending-table-character-tokens">pending table character
+    tokens</a></var> list.</p>
+
+   </dd>
+
+
+   <dt>Anything else</dt>
+   <dd>
+
+    <p>If any of the tokens in the <var><a href="#pending-table-character-tokens">pending table character
+    tokens</a></var> list are character tokens that are not one of U+0009
+    CHARACTER TABULATION, U+000A LINE FEED (LF), U+000C FORM FEED
+    (FF), <!--U+000D CARRIAGE RETURN (CR),--> or U+0020 SPACE, then
+    reprocess those character tokens using the rules given in the
+    "anything else" entry in the <a href="#parsing-main-intable" title="insertion mode: in
+    table">in table</a>" insertion mode.</p>
+
+    <p>Otherwise, <a href="#insert-a-character" title="insert a character">insert the
+    characters</a> given by the <var><a href="#pending-table-character-tokens">pending table character
+    tokens</a></var> list into the <a href="#current-node">current node</a>.</p>
+
+    <p>Switch the <a href="#insertion-mode">insertion mode</a> to the <a href="#original-insertion-mode">original
+    insertion mode</a> and reprocess the token.</p>
+
+   </dd>
+
+  </dl><h5 id="parsing-main-incaption"><span class="secno">9.2.5.14 </span>The "<dfn title="insertion mode: in caption">in caption</dfn>" insertion mode</h5>
 
   <p>When the <a href="#insertion-mode">insertion mode</a> is "<a href="#parsing-main-incaption" title="insertion
   mode: in caption">in caption</a>", tokens must be handled as follows:</p>
@@ -57298,7 +57331,7 @@
     mode</a>.</p>
    </dd>
 
-  </dl><h5 id="parsing-main-incolgroup"><span class="secno">9.2.5.14 </span>The "<dfn title="insertion mode: in column group">in column group</dfn>" insertion mode</h5>
+  </dl><h5 id="parsing-main-incolgroup"><span class="secno">9.2.5.15 </span>The "<dfn title="insertion mode: in column group">in column group</dfn>" insertion mode</h5>
 
   <p>When the <a href="#insertion-mode">insertion mode</a> is "<a href="#parsing-main-incolgroup" title="insertion
   mode: in column group">in column group</a>", tokens must be handled as follows:</p>
@@ -57385,7 +57418,7 @@
 
    </dd>
 
-  </dl><h5 id="parsing-main-intbody"><span class="secno">9.2.5.15 </span>The "<dfn title="insertion mode: in table body">in table body</dfn>" insertion mode</h5>
+  </dl><h5 id="parsing-main-intbody"><span class="secno">9.2.5.16 </span>The "<dfn title="insertion mode: in table body">in table body</dfn>" insertion mode</h5>
 
   <p>When the <a href="#insertion-mode">insertion mode</a> is "<a href="#parsing-main-intbody" title="insertion
   mode: in table body">in table body</a>", tokens must be handled as follows:</p>
@@ -57474,7 +57507,7 @@
   case</a>.</p>
 
 
-  <h5 id="parsing-main-intr"><span class="secno">9.2.5.16 </span>The "<dfn title="insertion mode: in row">in row</dfn>" insertion mode</h5>
+  <h5 id="parsing-main-intr"><span class="secno">9.2.5.17 </span>The "<dfn title="insertion mode: in row">in row</dfn>" insertion mode</h5>
 
   <p>When the <a href="#insertion-mode">insertion mode</a> is "<a href="#parsing-main-intr" title="insertion
   mode: in row">in row</a>", tokens must be handled as follows:</p>
@@ -57565,7 +57598,7 @@
   case</a>.</p>
 
 
-  <h5 id="parsing-main-intd"><span class="secno">9.2.5.17 </span>The "<dfn title="insertion mode: in cell">in cell</dfn>" insertion mode</h5>
+  <h5 id="parsing-main-intd"><span class="secno">9.2.5.18 </span>The "<dfn title="insertion mode: in cell">in cell</dfn>" insertion mode</h5>
 
   <p>When the <a href="#insertion-mode">insertion mode</a> is "<a href="#parsing-main-intd" title="insertion
   mode: in cell">in cell</a>", tokens must be handled as follows:</p>
@@ -57659,7 +57692,7 @@
   cell</a>".</p>
 
 
-  <h5 id="parsing-main-inselect"><span class="secno">9.2.5.18 </span>The "<dfn title="insertion mode: in select">in select</dfn>" insertion mode</h5>
+  <h5 id="parsing-main-inselect"><span class="secno">9.2.5.19 </span>The "<dfn title="insertion mode: in select">in select</dfn>" insertion mode</h5>
 
   <p>When the <a href="#insertion-mode">insertion mode</a> is "<a href="#parsing-main-inselect" title="insertion
   mode: in select">in select</a>", tokens must be handled as follows:</p>
@@ -57797,7 +57830,7 @@
     <p><a href="#parse-error">Parse error</a>. Ignore the token.</p>
    </dd>
 
-  </dl><h5 id="parsing-main-inselectintable"><span class="secno">9.2.5.19 </span>The "<dfn title="insertion mode: in select in table">in select in table</dfn>" insertion mode</h5>
+  </dl><h5 id="parsing-main-inselectintable"><span class="secno">9.2.5.20 </span>The "<dfn title="insertion mode: in select in table">in select in table</dfn>" insertion mode</h5>
 
   <p>When the <a href="#insertion-mode">insertion mode</a> is "<a href="#parsing-main-inselectintable" title="insertion
   mode: in select in table">in select in table</a>", tokens must be handled as follows:</p>
@@ -57829,7 +57862,7 @@
     mode</a>.</p>
    </dd>
 
-  </dl><h5 id="parsing-main-inforeign"><span class="secno">9.2.5.20 </span>The "<dfn title="insertion mode: in foreign content">in foreign content</dfn>" insertion mode</h5>
+  </dl><h5 id="parsing-main-inforeign"><span class="secno">9.2.5.21 </span>The "<dfn title="insertion mode: in foreign content">in foreign content</dfn>" insertion mode</h5>
 
   <p>When the <a href="#insertion-mode">insertion mode</a> is "<a href="#parsing-main-inforeign" title="insertion
   mode: in foreign content">in foreign content</a>", tokens must be
@@ -58023,7 +58056,7 @@
 
    </dd>
 
-  </dl><h5 id="parsing-main-afterbody"><span class="secno">9.2.5.21 </span>The "<dfn title="insertion mode: after body">after body</dfn>" insertion mode</h5>
+  </dl><h5 id="parsing-main-afterbody"><span class="secno">9.2.5.22 </span>The "<dfn title="insertion mode: after body">after body</dfn>" insertion mode</h5>
 
   <p>When the <a href="#insertion-mode">insertion mode</a> is "<a href="#parsing-main-afterbody" title="insertion
   mode: after body">after body</a>", tokens must be handled as follows:</p>
@@ -58081,7 +58114,7 @@
 
    </dd>
 
-  </dl><h5 id="parsing-main-inframeset"><span class="secno">9.2.5.22 </span>The "<dfn title="insertion mode: in frameset">in frameset</dfn>" insertion mode</h5>
+  </dl><h5 id="parsing-main-inframeset"><span class="secno">9.2.5.23 </span>The "<dfn title="insertion mode: in frameset">in frameset</dfn>" insertion mode</h5>
 
   <p>When the <a href="#insertion-mode">insertion mode</a> is "<a href="#parsing-main-inframeset" title="insertion
   mode: in frameset">in frameset</a>", tokens must be handled as follows:</p>
@@ -58174,7 +58207,7 @@
     <p><a href="#parse-error">Parse error</a>. Ignore the token.</p>
    </dd>
 
-  </dl><h5 id="parsing-main-afterframeset"><span class="secno">9.2.5.23 </span>The "<dfn title="insertion mode: after frameset">after frameset</dfn>" insertion mode</h5>
+  </dl><h5 id="parsing-main-afterframeset"><span class="secno">9.2.5.24 </span>The "<dfn title="insertion mode: after frameset">after frameset</dfn>" insertion mode</h5>
 
   <p>When the <a href="#insertion-mode">insertion mode</a> is "<a href="#parsing-main-afterframeset" title="insertion
   mode: after frameset">after frameset</a>", tokens must be handled as follows:</p>
@@ -58234,7 +58267,7 @@
   harder.</p>
 
 
-  <h5 id="the-after-after-body-insertion-mode"><span class="secno">9.2.5.24 </span>The "<dfn title="insertion mode: after after body">after after body</dfn>" insertion mode</h5>
+  <h5 id="the-after-after-body-insertion-mode"><span class="secno">9.2.5.25 </span>The "<dfn title="insertion mode: after after body">after after body</dfn>" insertion mode</h5>
 
   <p>When the <a href="#insertion-mode">insertion mode</a> is "<a href="#the-after-after-body-insertion-mode" title="insertion
   mode: after after body">after after body</a>", tokens must be handled as follows:</p>
@@ -58268,7 +58301,7 @@
     reprocess the token.</p>
    </dd>
 
-  </dl><h5 id="the-after-after-frameset-insertion-mode"><span class="secno">9.2.5.25 </span>The "<dfn title="insertion mode: after after frameset">after after frameset</dfn>" insertion mode</h5>
+  </dl><h5 id="the-after-after-frameset-insertion-mode"><span class="secno">9.2.5.26 </span>The "<dfn title="insertion mode: after after frameset">after after frameset</dfn>" insertion mode</h5>
 
   <p>When the <a href="#insertion-mode">insertion mode</a> is "<a href="#the-after-after-frameset-insertion-mode" title="insertion
   mode: after after frameset">after after frameset</a>", tokens must be handled as follows:</p>
@@ -58639,10 +58672,9 @@
   the elements <code><a href="#the-html-element">html</a></code>, <code><a href="#the-body-element">body</a></code>,
   <code><a href="#the-table-element">table</a></code>, and <code><a href="#the-b-element">b</a></code> (in that order, despite the
   resulting DOM tree); the <a href="#list-of-active-formatting-elements">list of active formatting
-  elements</a> just has the <code><a href="#the-b-element">b</a></code> element in it; the
+  elements</a> just has the <code><a href="#the-b-element">b</a></code> element in it; and the
   <a href="#insertion-mode">insertion mode</a> is "<a href="#parsing-main-intable" title="insertion mode: in
-  table">in table</a>"; and the <code><a href="#the-table-element">table</a></code> element is
-  <a href="#tainted">tainted</a>.</p>
+  table">in table</a>".</p>
 
   <p>The <code><a href="#the-tr-element">tr</a></code> start tag causes the <code><a href="#the-b-element">b</a></code> element
   to be popped off the stack and a <code><a href="#the-tbody-element">tbody</a></code> start tag to be
@@ -58657,9 +58689,8 @@
   elements <code><a href="#the-html-element">html</a></code>, <code><a href="#the-body-element">body</a></code>, <code><a href="#the-table-element">table</a></code>,
   <code><a href="#the-tbody-element">tbody</a></code>, and <code><a href="#the-tr-element">tr</a></code>; the <a href="#list-of-active-formatting-elements">list of active
   formatting elements</a> still has the <code><a href="#the-b-element">b</a></code> element in
-  it; the <a href="#insertion-mode">insertion mode</a> is "<a href="#parsing-main-intr" title="insertion mode:
-  in row">in row</a>"; and the <code><a href="#the-table-element">table</a></code> element is still
-  <a href="#tainted">tainted</a>.</p>
+  it; and the <a href="#insertion-mode">insertion mode</a> is "<a href="#parsing-main-intr" title="insertion
+  mode: in row">in row</a>".</p>
 
   <p>The <code><a href="#the-td-element">td</a></code> element start tag token, after putting a
   <code><a href="#the-td-element">td</a></code> element on the tree, puts a marker on the <a href="#list-of-active-formatting-elements">list
@@ -58675,33 +58706,40 @@
   elements <code><a href="#the-html-element">html</a></code>, <code><a href="#the-body-element">body</a></code>, <code><a href="#the-table-element">table</a></code>,
   and <code><a href="#the-tbody-element">tbody</a></code>; the <a href="#list-of-active-formatting-elements">list of active formatting
   elements</a> still has the <code><a href="#the-b-element">b</a></code> element in it (the
-  marker having been removed by the "td" end tag token); the
+  marker having been removed by the "td" end tag token); and the
   <a href="#insertion-mode">insertion mode</a> is "<a href="#parsing-main-intbody" title="insertion mode: in
-  table body">in table body</a>"; and the <code><a href="#the-table-element">table</a></code>
-  element is still <a href="#tainted">tainted</a>.</p>
+  table body">in table body</a>".</p>
 
-  <p>Thus it is that the "bbb" character tokens are found. When <a href="#reconstruct-the-active-formatting-elements" title="reconstruct the active formatting elements">the active
-  formatting elements are reconstructed</a>, a <code><a href="#the-b-element">b</a></code>
-  element is created and <a href="#foster-parent" title="foster parent">foster
-  parented</a>, and then the "bbb" text node is appended to it:</p>
+  <p>Thus it is that the "bbb" character tokens are found. These
+  trigger the "<a href="#parsing-main-intabletext" title="insertion mode: in table text">in table
+  text</a>" insertion mode to be used (with the <a href="#original-insertion-mode">original
+  insertion mode</a> set to "<a href="#parsing-main-intbody" title="insertion mode: in table
+  body">in table body</a>"). The character tokens are collected,
+  and when the next token (the <code><a href="#the-table-element">table</a></code> element end tag) is
+  seen, they are processed as a group. Since they are not all spaces,
+  they are handled as per the "anything else" rules in the "<a href="#parsing-main-intable" title="insertion mode: in table">in table</a>" insertion mode,
+  which defer to the "<a href="#parsing-main-inbody" title="insertion mode: in body">in
+  body</a>" insertion mode but with <a href="#foster-parent" title="foster
+  parent">foster parenting</a>.</p>
+
+  <p>When <a href="#reconstruct-the-active-formatting-elements" title="reconstruct the active formatting elements">the
+  active formatting elements are reconstructed</a>, a
+  <code><a href="#the-b-element">b</a></code> element is created and <a href="#foster-parent" title="foster
+  parent">foster parented</a>, and then the "bbb" text node is
+  appended to it:</p>
 
   <ul class="domTree"><li class="t1"><code><a href="#the-html-element">html</a></code><ul><li class="t1"><code><a href="#the-head-element">head</a></code><li class="t1"><code><a href="#the-body-element">body</a></code><ul><li class="t1"><code><a href="#the-b-element">b</a></code><li class="t1"><code><a href="#the-b-element">b</a></code><ul><li class="t3"><code>#text</code>: <span title="">bbb</span></ul><li class="t1"><code><a href="#the-table-element">table</a></code><ul><li class="t1"><code><a href="#the-tbody-element">tbody</a></code><ul><li class="t1"><code><a href="#the-tr-element">tr</a></code><ul><li class="t1"><code><a href="#the-td-element">td</a></code><ul><li class="t3"><code>#text</code>: <span title="">aaa</span></ul></ul></ul></ul></ul></ul></ul><p>The <a href="#stack-of-open-elements">stack of open elements</a> has on it the elements
   <code><a href="#the-html-element">html</a></code>, <code><a href="#the-body-element">body</a></code>, <code><a href="#the-table-element">table</a></code>,
   <code><a href="#the-tbody-element">tbody</a></code>, and the new <code><a href="#the-b-element">b</a></code> (again, note that
   this doesn't match the resulting tree!); the <a href="#list-of-active-formatting-elements">list of active
   formatting elements</a> has the new <code><a href="#the-b-element">b</a></code> element in it;
-  the <a href="#insertion-mode">insertion mode</a> is still "<a href="#parsing-main-intbody" title="insertion
-  mode: in table body">in table body</a>"; and the
-  <code><a href="#the-table-element">table</a></code> element is still <a href="#tainted">tainted</a>.</p>
+  and the <a href="#insertion-mode">insertion mode</a> is still "<a href="#parsing-main-intbody" title="insertion
+  mode: in table body">in table body</a>".</p>
 
-  <p>Had the character tokens been <a href="#space-character" title="space character">space
-  characters</a> instead of "bbb", the result would have been the
-  same, but only because the table is <a href="#tainted">tainted</a>. Had the
-  <code><a href="#the-b-element">b</a></code> element's start tag been before the
-  <code><a href="#the-table-element">table</a></code> instead of after, then the table wouldn't have
-  been <a href="#tainted">tainted</a> and such <a href="#space-character" title="space
-  character">space characters</a> would just be appended to the
-  <code><a href="#the-tbody-element">tbody</a></code> element.</p>
+  <p>Had the character tokens been only <a href="#space-character" title="space
+  character">space characters</a> instead of "bbb", then those
+  <a href="#space-character" title="space character">space characters</a> would just be
+  appended to the <code><a href="#the-tbody-element">tbody</a></code> element.</p>
 
   <p>Finally, the <code><a href="#the-table-element">table</a></code> is closed by a "table" end
   tag. This pops all the nodes from the <a href="#stack-of-open-elements">stack of open

Received on Friday, 10 July 2009 00:36:55 UTC