[html5] r6870 - [cgiowt] (0) Try to fix the problem David Flanagan raised a while back with the [...]

whatwg at whatwg.org whatwg at whatwg.org
Tue Dec 13 14:36:29 PST 2011


Author: ianh
Date: 2011-12-13 14:36:28 -0800 (Tue, 13 Dec 2011)
New Revision: 6870

Modified:
   complete.html
   index
   source
Log:
[cgiowt] (0) Try to fix the problem David Flanagan raised a while back with the <!DOCTYPE html><body><table><math><mi>foo</mi></math></table> test case.
Affected topics: HTML Syntax and Parsing

Modified: complete.html
===================================================================
--- complete.html	2011-12-09 23:12:25 UTC (rev 6869)
+++ complete.html	2011-12-13 22:36:28 UTC (rev 6870)
@@ -240,7 +240,7 @@
 
   <header class=head id=head><p><a class=logo href=http://www.whatwg.org/><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
    <hgroup><h1 class=allcaps>HTML</h1>
-    <h2 class="no-num no-toc">Living Standard — Last Updated 9 December 2011</h2>
+    <h2 class="no-num no-toc">Living Standard — Last Updated 13 December 2011</h2>
    </hgroup><dl><dt><strong>Web developer edition:</strong></dt>
     <dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
     <dt>Multiple-page version:</dt>
@@ -86514,7 +86514,7 @@
 
   <p>When the user agent is to apply the rules for the "<a href=#parsing-main-intable title="insertion mode: in table">in table</a>" <a href=#insertion-mode>insertion mode</a>, the user agent must handle the token as follows:</p>
 
-  <dl class=switch><dt>A character token</dt>
+  <dl class=switch><dt>A character token, if the <a href=#current-node>current node</a> is <code><a href=#the-table-element>table</a></code>, <code><a href=#the-tbody-element>tbody</a></code>, <code><a href=#the-tfoot-element>tfoot</a></code>, <code><a href=#the-thead-element>thead</a></code>, or <code><a href=#the-tr-element>tr</a></code> element</dt>
    <dd>
 
      <p>Let the <dfn id=pending-table-character-tokens><var>pending table character tokens</var></dfn>
@@ -86693,11 +86693,11 @@
 
     <p><a href=#parse-error>Parse error</a>. Process the token <a href=#using-the-rules-for>using the
     rules for</a> the "<a href=#parsing-main-inbody title="insertion mode: in body">in
-    body</a>" <a href=#insertion-mode>insertion mode</a>, except that if the
+    body</a>" <a href=#insertion-mode>insertion mode</a>, except that whenever a
+    node would be inserted into the <a href=#current-node>current node</a> when the
     <a href=#current-node>current node</a> is a <code><a href=#the-table-element>table</a></code>,
     <code><a href=#the-tbody-element>tbody</a></code>, <code><a href=#the-tfoot-element>tfoot</a></code>, <code><a href=#the-thead-element>thead</a></code>, or
-    <code><a href=#the-tr-element>tr</a></code> element, then, whenever a node would be inserted
-    into the <a href=#current-node>current node</a>, it must instead be <a href=#foster-parent title="foster parent">foster parented</a>.</p>
+    <code><a href=#the-tr-element>tr</a></code> element, then it must instead be <a href=#foster-parent title="foster parent">foster parented</a>.</p>
 
    </dd>
 
@@ -86737,16 +86737,26 @@
    <dt>Anything else</dt>
    <dd>
 
+    <!-- this can only be called if the current node is one of the
+    table model elements -->
+
     <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 <a href=#space-character title="space character">space characters</a>, then reprocess
     the character tokens in the <var><a href=#pending-table-character-tokens>pending table character
-    tokens</a></var> list using the rules given in the "anything
-    else" entry in the "<a href=#parsing-main-intable title="insertion mode: in table">in
+    tokens</a></var> list 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>
 
+    <!-- if there's active formatting elements, it'll recreate those
+    and foster parent the top one and then put the text nodes in the
+    formatting elements; otherwise, it'll foster parent the character
+    tokens. -->
+
     <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>
+    tokens</a></var> list into the <a href=#current-node>current node</a>.</p> <!--
+    i.e. inter-element whitespace in the table model isn't foster
+    parented -->
 
     <!-- no need to empty the list, we're leaving the insertion mode
     and the list is always emptied before we reenter the mode -->

Modified: index
===================================================================
--- index	2011-12-09 23:12:25 UTC (rev 6869)
+++ index	2011-12-13 22:36:28 UTC (rev 6870)
@@ -240,7 +240,7 @@
 
   <header class=head id=head><p><a class=logo href=http://www.whatwg.org/><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
    <hgroup><h1 class=allcaps>HTML</h1>
-    <h2 class="no-num no-toc">Living Standard — Last Updated 9 December 2011</h2>
+    <h2 class="no-num no-toc">Living Standard — Last Updated 13 December 2011</h2>
    </hgroup><dl><dt><strong>Web developer edition:</strong></dt>
     <dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
     <dt>Multiple-page version:</dt>
@@ -86514,7 +86514,7 @@
 
   <p>When the user agent is to apply the rules for the "<a href=#parsing-main-intable title="insertion mode: in table">in table</a>" <a href=#insertion-mode>insertion mode</a>, the user agent must handle the token as follows:</p>
 
-  <dl class=switch><dt>A character token</dt>
+  <dl class=switch><dt>A character token, if the <a href=#current-node>current node</a> is <code><a href=#the-table-element>table</a></code>, <code><a href=#the-tbody-element>tbody</a></code>, <code><a href=#the-tfoot-element>tfoot</a></code>, <code><a href=#the-thead-element>thead</a></code>, or <code><a href=#the-tr-element>tr</a></code> element</dt>
    <dd>
 
      <p>Let the <dfn id=pending-table-character-tokens><var>pending table character tokens</var></dfn>
@@ -86693,11 +86693,11 @@
 
     <p><a href=#parse-error>Parse error</a>. Process the token <a href=#using-the-rules-for>using the
     rules for</a> the "<a href=#parsing-main-inbody title="insertion mode: in body">in
-    body</a>" <a href=#insertion-mode>insertion mode</a>, except that if the
+    body</a>" <a href=#insertion-mode>insertion mode</a>, except that whenever a
+    node would be inserted into the <a href=#current-node>current node</a> when the
     <a href=#current-node>current node</a> is a <code><a href=#the-table-element>table</a></code>,
     <code><a href=#the-tbody-element>tbody</a></code>, <code><a href=#the-tfoot-element>tfoot</a></code>, <code><a href=#the-thead-element>thead</a></code>, or
-    <code><a href=#the-tr-element>tr</a></code> element, then, whenever a node would be inserted
-    into the <a href=#current-node>current node</a>, it must instead be <a href=#foster-parent title="foster parent">foster parented</a>.</p>
+    <code><a href=#the-tr-element>tr</a></code> element, then it must instead be <a href=#foster-parent title="foster parent">foster parented</a>.</p>
 
    </dd>
 
@@ -86737,16 +86737,26 @@
    <dt>Anything else</dt>
    <dd>
 
+    <!-- this can only be called if the current node is one of the
+    table model elements -->
+
     <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 <a href=#space-character title="space character">space characters</a>, then reprocess
     the character tokens in the <var><a href=#pending-table-character-tokens>pending table character
-    tokens</a></var> list using the rules given in the "anything
-    else" entry in the "<a href=#parsing-main-intable title="insertion mode: in table">in
+    tokens</a></var> list 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>
 
+    <!-- if there's active formatting elements, it'll recreate those
+    and foster parent the top one and then put the text nodes in the
+    formatting elements; otherwise, it'll foster parent the character
+    tokens. -->
+
     <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>
+    tokens</a></var> list into the <a href=#current-node>current node</a>.</p> <!--
+    i.e. inter-element whitespace in the table model isn't foster
+    parented -->
 
     <!-- no need to empty the list, we're leaving the insertion mode
     and the list is always emptied before we reenter the mode -->

Modified: source
===================================================================
--- source	2011-12-09 23:12:25 UTC (rev 6869)
+++ source	2011-12-13 22:36:28 UTC (rev 6870)
@@ -100209,7 +100209,7 @@
 
   <dl class="switch">
 
-   <dt>A character token</dt>
+   <dt>A character token, if the <span>current node</span> is <code>table</code>, <code>tbody</code>, <code>tfoot</code>, <code>thead</code>, or <code>tr</code> element</dt>
    <dd>
 
      <p>Let the <dfn><var>pending table character tokens</var></dfn>
@@ -100395,11 +100395,11 @@
 
     <p><span>Parse error</span>. Process the token <span>using the
     rules for</span> the "<span title="insertion mode: in body">in
-    body</span>" <span>insertion mode</span>, except that if the
+    body</span>" <span>insertion mode</span>, except that whenever a
+    node would be inserted into the <span>current node</span> when 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 <span
+    <code>tr</code> element, then it must instead be <span
     title="foster parent">foster parented</span>.</p>
 
    </dd>
@@ -100444,17 +100444,27 @@
    <dt>Anything else</dt>
    <dd>
 
+    <!-- this can only be called if the current node is one of the
+    table model elements -->
+
     <p>If any of the tokens in the <var>pending table character
     tokens</var> list are character tokens that are not <span
     title="space character">space characters</span>, then reprocess
     the character tokens in the <var>pending table character
-    tokens</var> list using the rules given in the "anything
-    else" entry in the "<span title="insertion mode: in table">in
+    tokens</var> list using the rules given in the "anything else"
+    entry in the "<span title="insertion mode: in table">in
     table</span>" insertion mode.</p>
 
+    <!-- if there's active formatting elements, it'll recreate those
+    and foster parent the top one and then put the text nodes in the
+    formatting elements; otherwise, it'll foster parent the character
+    tokens. -->
+
     <p>Otherwise, <span title="insert a character">insert the
     characters</span> given by the <var>pending table character
-    tokens</var> list into the <span>current node</span>.</p>
+    tokens</var> list into the <span>current node</span>.</p> <!--
+    i.e. inter-element whitespace in the table model isn't foster
+    parented -->
 
     <!-- no need to empty the list, we're leaving the insertion mode
     and the list is always emptied before we reenter the mode -->




More information about the Commit-Watchers mailing list