hixie: Coalesce text nodes even if they're not parser-inserted. (whatwg r5298)

hixie: Coalesce text nodes even if they're not parser-inserted. (whatwg
r5298)

http://dev.w3.org/cvsweb/html5/spec/Overview.html?r1=1.4220&r2=1.4221&f=h
http://html5.org/tools/web-apps-tracker?from=5297&to=5298

===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.4220
retrieving revision 1.4221
diff -u -d -r1.4220 -r1.4221
--- Overview.html 16 Aug 2010 20:26:08 -0000 1.4220
+++ Overview.html 16 Aug 2010 20:38:29 -0000 1.4221
@@ -56049,11 +56049,10 @@
   <p>When the steps below require the UA to <dfn id="insert-a-character">insert a
   character</dfn> into a node, if that node has a child immediately
   before where the character is to be inserted, and that child is a
-  <code><a href="#text">Text</a></code> node, and that <code><a href="#text">Text</a></code> node was the last
-  node that the parser inserted into the document, then the character
-  must be appended to that <code><a href="#text">Text</a></code> node; otherwise, a new
-  <code><a href="#text">Text</a></code> node whose data is just that character must be
-  inserted in the appropriate place.</p>
+  <code><a href="#text">Text</a></code> node, then the character must be appended to that
+  <code><a href="#text">Text</a></code> node; otherwise, a new <code><a href="#text">Text</a></code> node
+  whose data is just that character must be inserted in the
+  appropriate place.</p>
 
   <div class="example">
 
@@ -56066,24 +56065,24 @@
 var&nbsp;script&nbsp;=&nbsp;document.getElementsByTagName('script')[0];
 document.body.removeChild(script);
 &lt;/script&gt;B</pre>
-      <td>Two adjacent text nodes in the document, containing "A" and "B".
+      <td>One text node in the document, containing "AB".
      <tr><td><pre>A&lt;script&gt;
 var&nbsp;text&nbsp;=&nbsp;document.createTextNode('B');
 document.body.appendChild(text);
 &lt;/script&gt;C</pre>
-      <td>Four text nodes; "A" before the script, the script's contents, "B" after the script, and then, immediately after that, "C".
+      <td>Three text nodes; "A" before the script, the script's contents, and "BC" after the script (the parser appends to the text node created by the script).
      <tr><td><pre>A&lt;script&gt;
 var&nbsp;text&nbsp;=&nbsp;document.getElementsByTagName('script')[0].firstChild;
 text.data&nbsp;=&nbsp;'B';
 document.body.appendChild(text);
-&lt;/script&gt;B</pre>
-      <td>Two adjacent text nodes in the document, containing "A" and "BB".
-     <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 "&nbsp;B&nbsp;B" (space-B-space-B) respectively. (This is caused by <a href="#foster-parent" title="foster parent">foster parenting</a>.)
+&lt;/script&gt;C</pre>
+      <td>Two adjacent text nodes in the document, containing "A" and "BC".
+     <tr><td><pre>A&lt;table&gt;B&lt;tr&gt;C&lt;/tr&gt;D&lt;/table&gt;</pre>
+      <td>One text node before the table, containing "ABCD". (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;C&lt;/table&gt;</pre>
+      <td>One text node before the table, containing "A&nbsp;B&nbsp;C" (A-space-B-space-C). (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.)
+      <td>One text node before the table, containing "A&nbsp;BC" (A-space-B-C), 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

Received on Monday, 16 August 2010 20:39:14 UTC