NOTE: The current preferred location for bug reports is the GitHub issue tracker.
Bug 127 - Make spaces take part in the <table> foster parenting after anything else has taken part in it. This is a high-risk change, let me know if anything breaks or if I missed anything.
Make spaces take part in the <table> foster parenting after anything else has...
Status: RESOLVED FIXED
Product: Validator.nu
Classification: Unclassified
Component: HTML parser
HEAD
All All
: P2 normal
Assigned To: Henri Sivonen
http://svn.whatwg.org/webapps/source?...
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-03-04 11:19 CET by Nobody
Modified: 2008-03-07 15:45 CET (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-04 11:19:45 CET
Index: source
===================================================================
--- source	(revision 1325)
+++ source	(revision 1326)
@@ -37813,6 +37813,13 @@
   <p>The <dfn>current node</dfn> is the bottommost node in this
   stack.</p>
 
+  <p>The <dfn>current table</dfn> is the last <code>table</code>
+  element in the <span>stack of open elements</span>, if there is
+  one. If there is no <code>table</code> element in the <span>stack of
+  open elements</span> (<span>fragment case</span>), then the
+  <span>current table</span> is the first element in the <span>stack
+  of open elements</span> (the <code>html</code> element).</p>
+
   <p>Elements in the stack fall into the following categories:</p>
 
   <dl>
@@ -40129,8 +40136,13 @@
    TABULATION, U+000C FORM FEED (FF), <!--U+000D CARRIAGE RETURN (CR),-->
    or U+0020 SPACE</dt>
    <dd>
-    <p><span title="append a character">Append the character</span> to
-    the <span>current node</span>.</p>
+
+    <p>If the <span>current table</span> is <span>tainted</span>, then
+    treat the token as per the "anything else" entry below.</p>
+
+    <p>Otherwise, <span title="append a character">append the
+    character</span> to the <span>current node</span>.</p>
+
    </dd>
 
    <dt>A comment token</dt>
@@ -40251,9 +40263,13 @@
 
     <p>If the <span>current node</span> is a <code>table</code>,
     <code>tbody</code>, <code>tfoot</code>, <code>thead</code>, or
-    <code>tr</code> element, then, whenever a node would be
-    inserted into the <span>current node</span>, it must instead
-    be inserted into the <em>foster parent element</em>.</p>
+    <code>tr</code> element, then, whenever a node would be inserted
+    into the <span>current node</span>, it must instead be inserted
+    into the <i>foster parent element</i>, and the <span>current
+    table</span> must be marked as <dfn>tainted</dfn>. (Once the
+    <span>current table</span> has been <span>tainted</span>,
+    whitespace characters are inserted into the <i>foster parent
+    element</i> instead of the <span>current node</span>.)</p>
 
     <p>The <dfn>foster parent element</dfn> is the parent element
     of the last <code>table</code> element in the <span>stack of