- From: poot <cvsmail@w3.org>
- Date: Tue, 17 Aug 2010 05:43:30 +0900 (JST)
- To: public-html-diffs@w3.org
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 script = document.getElementsByTagName('script')[0]; document.body.removeChild(script); </script>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<script> var text = document.createTextNode('B'); document.body.appendChild(text); </script>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<script> var text = document.getElementsByTagName('script')[0].firstChild; text.data = 'B'; document.body.appendChild(text); -</script>B</pre> - <td>Two adjacent text nodes in the document, containing "A" and "BB". - <tr><td><pre>A<table>B<tr>C</tr>C</table></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<table><tr> B</tr> B</table></pre> - <td>Two adjacent text nodes before the table, containing "A" and " B B" (space-B-space-B) respectively. (This is caused by <a href="#foster-parent" title="foster parent">foster parenting</a>.) +</script>C</pre> + <td>Two adjacent text nodes in the document, containing "A" and "BC". + <tr><td><pre>A<table>B<tr>C</tr>D</table></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<table><tr> B</tr> C</table></pre> + <td>One text node before the table, containing "A B C" (A-space-B-space-C). (This is caused by <a href="#foster-parent" title="foster parent">foster parenting</a>.) <tr><td><pre>A<table><tr> B</tr> </em>C</table></pre> - <td>Three adjacent text nodes before the table, containing "A", " 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 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