[html5] r1334 - /

whatwg at whatwg.org whatwg at whatwg.org
Mon Mar 3 23:25:22 PST 2008


Author: ianh
Date: 2008-03-03 23:25:17 -0800 (Mon, 03 Mar 2008)
New Revision: 1334

Modified:
   index
   source
Log:
[acgiowt] (2) Redefine how 'append a character' works, and rename it to 'insert a character'.

Modified: index
===================================================================
--- index	2008-03-04 07:11:44 UTC (rev 1333)
+++ index	2008-03-04 07:25:17 UTC (rev 1334)
@@ -40449,11 +40449,12 @@
    render the <code>Document</code> so that it is available to the user, or
    when it has to begin accepting user input.
 
-  <p>When the steps below require the UA to <dfn id=append>append a
-   character</dfn> to a node, the UA must collect it and all subsequent
-   consecutive characters that would be appended to that node, and insert one
-   <code>Text</code> node whose data is the concatenation of all those
-   characters.
+  <p>When the steps below require the UA to <dfn id=insert>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>Text</code> node, then the character must be appended to that
+   <code>Text</code> node; otherwise, a new <code>Text</code> node whose data
+   is just that character must be inserted in the appropriate place.
 
   <p id=mutation-during-parsing>DOM mutation events must not fire for changes
    caused by the UA parsing the document. (Conceptually, the parser is not
@@ -40795,7 +40796,7 @@
    href="#html-namespace0">HTML namespace</a>, and with the attributes on the
    node being those given in the given token.
 
-  <p>When the steps below require the UA to <dfn id=insert>insert an HTML
+  <p>When the steps below require the UA to <dfn id=insert0>insert an HTML
    element</dfn> for a token, the UA must first <a href="#create">create an
    element for the token</a>, and then append this node to the <a
    href="#current4">current node</a>, and push it onto the <a
@@ -41535,8 +41536,8 @@
     <!--U+000D CARRIAGE RETURN (CR),--> or U+0020 SPACE
 
    <dd>
-    <p><a href="#append" title="append a character">Append the character</a>
-     to the <a href="#current4">current node</a>.</p>
+    <p><a href="#insert" title="insert a character">Insert the character</a>
+     into the <a href="#current4">current node</a>.</p>
 
    <dt>A comment token
 
@@ -41560,14 +41561,14 @@
    <dt>A start tag whose tag name is one of: "base", "link"
 
    <dd>
-    <p><a href="#insert">Insert an HTML element</a> for the token.
+    <p><a href="#insert0">Insert an HTML element</a> for the token.
      Immediately pop the <a href="#current4">current node</a> off the <a
      href="#stack">stack of open elements</a>.</p>
 
    <dt>A start tag whose tag name is "meta"
 
    <dd>
-    <p><a href="#insert">Insert an HTML element</a> for the token.
+    <p><a href="#insert0">Insert an HTML element</a> for the token.
      Immediately pop the <a href="#current4">current node</a> off the <a
      href="#stack">stack of open elements</a>.</p>
 
@@ -41606,7 +41607,7 @@
     href="#scripting1">scripting is disabled</a>:
 
    <dd>
-    <p><a href="#insert">Insert an HTML element</a> for the token.</p>
+    <p><a href="#insert0">Insert an HTML element</a> for the token.</p>
 
     <p>Change the <a href="#insertion0">insertion mode</a> to "<a
      href="#in-head0" title="insertion mode: in head noscript">in head
@@ -41849,8 +41850,8 @@
     <!--U+000D CARRIAGE RETURN (CR),--> or U+0020 SPACE
 
    <dd>
-    <p><a href="#append" title="append a character">Append the character</a>
-     to the <a href="#current4">current node</a>.</p>
+    <p><a href="#insert" title="insert a character">Insert the character</a>
+     into the <a href="#current4">current node</a>.</p>
 
    <dt>A comment token
 
@@ -41874,7 +41875,7 @@
    <dt>A start tag whose tag name is "body"
 
    <dd>
-    <p><a href="#insert">Insert an HTML element</a> for the token.</p>
+    <p><a href="#insert0">Insert an HTML element</a> for the token.</p>
 
     <p>Change the <a href="#insertion0">insertion mode</a> to "<a
      href="#in-body" title="insertion mode: in body">in body</a>".</p>
@@ -41882,7 +41883,7 @@
    <dt>A start tag whose tag name is "frameset"
 
    <dd>
-    <p><a href="#insert">Insert an HTML element</a> for the token.</p>
+    <p><a href="#insert0">Insert an HTML element</a> for the token.</p>
 
     <p>Change the <a href="#insertion0">insertion mode</a> to "<a
      href="#in-frameset" title="insertion mode: in frameset">in
@@ -41931,8 +41932,8 @@
     <p><a href="#reconstruct">Reconstruct the active formatting elements</a>,
      if any.</p>
 
-    <p><a href="#append" title="append a character">Append the token's
-     character</a> to the <a href="#current4">current node</a>.</p>
+    <p><a href="#insert" title="insert a character">Insert the token's
+     character</a> into the <a href="#current4">current node</a>.</p>
 
    <dt>A comment token
 
@@ -42038,7 +42039,7 @@
     popped from the stack.</p>
     -->
     
-    <p><a href="#insert">Insert an HTML element</a> for the token.</p>
+    <p><a href="#insert0">Insert an HTML element</a> for the token.</p>
 
    <dt>A start tag whose tag name is one of: "pre", "listing"
 
@@ -42048,7 +42049,7 @@
      scope</a>, then act as if an end tag with the tag name <code><a
      href="#p">p</a></code> had been seen.</p>
 
-    <p><a href="#insert">Insert an HTML element</a> for the token.</p>
+    <p><a href="#insert0">Insert an HTML element</a> for the token.</p>
 
     <p>If the next token is a U+000A LINE FEED (LF) character token, then
      ignore that token and move on to the next one. (Newlines at the start of
@@ -42069,7 +42070,7 @@
      scope</a>, then act as if an end tag with the tag name <code><a
      href="#p">p</a></code> had been seen.</p>
 
-    <p><a href="#insert">Insert an HTML element</a> for the token, and set
+    <p><a href="#insert0">Insert an HTML element</a> for the token, and set
      the <code title=form>form</code> element pointer to point to the element
      created.</p>
 
@@ -42116,7 +42117,7 @@
        <a href="#stack">stack of open elements</a> and return to step 2.
     </ol>
 
-    <p>Finally, <a href="#insert">insert an HTML element</a> for the token.</p>
+    <p>Finally, <a href="#insert0">insert an HTML element</a> for the token.</p>
 
    <dt>A start tag whose tag name is one of: "dd", "dt"
 
@@ -42162,7 +42163,7 @@
        <a href="#stack">stack of open elements</a> and return to step 2.
     </ol>
 
-    <p>Finally, <a href="#insert">insert an HTML element</a> for the token.</p>
+    <p>Finally, <a href="#insert0">insert an HTML element</a> for the token.</p>
 
    <dt>A start tag whose tag name is "plaintext"
 
@@ -42172,7 +42173,7 @@
      scope</a>, then act as if an end tag with the tag name <code><a
      href="#p">p</a></code> had been seen.</p>
 
-    <p><a href="#insert">Insert an HTML element</a> for the token.</p>
+    <p><a href="#insert0">Insert an HTML element</a> for the token.</p>
 
     <p>Switch the <a href="#content2">content model flag</a> to the PLAINTEXT
      state.</p>
@@ -42339,7 +42340,7 @@
     <p><a href="#reconstruct">Reconstruct the active formatting elements</a>,
      if any.</p>
 
-    <p><a href="#insert">Insert an HTML element</a> for the token. Add that
+    <p><a href="#insert0">Insert an HTML element</a> for the token. Add that
      element to the <a href="#list-of4">list of active formatting
      elements</a>.</p>
 
@@ -42350,7 +42351,7 @@
     <p><a href="#reconstruct">Reconstruct the active formatting elements</a>,
      if any.</p>
 
-    <p><a href="#insert">Insert an HTML element</a> for the token. Add that
+    <p><a href="#insert0">Insert an HTML element</a> for the token. Add that
      element to the <a href="#list-of4">list of active formatting
      elements</a>.</p>
 
@@ -42367,7 +42368,7 @@
      again <a href="#reconstruct">reconstruct the active formatting
      elements</a>, if any.</p>
 
-    <p><a href="#insert">Insert an HTML element</a> for the token. Add that
+    <p><a href="#insert0">Insert an HTML element</a> for the token. Add that
      element to the <a href="#list-of4">list of active formatting
      elements</a>.</p>
 
@@ -42542,7 +42543,7 @@
     <p><a href="#reconstruct">Reconstruct the active formatting elements</a>,
      if any.</p>
 
-    <p><a href="#insert">Insert an HTML element</a> for the token.</p>
+    <p><a href="#insert0">Insert an HTML element</a> for the token.</p>
 
     <p>If the <a href="#form-element"><code title="">form</code> element
      pointer</a> is not null, then <span>associate</span><!--XXX xref! -->
@@ -42559,7 +42560,7 @@
     <p><a href="#reconstruct">Reconstruct the active formatting elements</a>,
      if any.</p>
 
-    <p><a href="#insert">Insert an HTML element</a> for the token.</p>
+    <p><a href="#insert0">Insert an HTML element</a> for the token.</p>
 
     <p>Insert a marker at the end of the <a href="#list-of4">list of active
      formatting elements</a>.</p>
@@ -42609,7 +42610,7 @@
      scope</a>, then act as if an end tag with the tag name <code><a
      href="#p">p</a></code> had been seen.</p>
     <!-- XXX quirks: don't do this -->
-    <p><a href="#insert">Insert an HTML element</a> for the token.</p>
+    <p><a href="#insert0">Insert an HTML element</a> for the token.</p>
 
     <p>Change the <a href="#insertion0">insertion mode</a> to "<a
      href="#in-table" title="insertion mode: in table">in table</a>".</p>
@@ -42621,7 +42622,7 @@
     <p><a href="#reconstruct">Reconstruct the active formatting elements</a>,
      if any.</p>
 
-    <p><a href="#insert">Insert an HTML element</a> for the token.
+    <p><a href="#insert0">Insert an HTML element</a> for the token.
      Immediately pop the <a href="#current4">current node</a> off the <a
      href="#stack">stack of open elements</a>.</p>
 
@@ -42633,7 +42634,7 @@
      scope</a>, then act as if an end tag with the tag name <code><a
      href="#p">p</a></code> had been seen.</p>
     <!-- XXX quirks: don't do this -->
-    <p><a href="#insert">Insert an HTML element</a> for the token.
+    <p><a href="#insert0">Insert an HTML element</a> for the token.
      Immediately pop the <a href="#current4">current node</a> off the <a
      href="#stack">stack of open elements</a>.</p>
 
@@ -42653,7 +42654,7 @@
     <p><a href="#reconstruct">Reconstruct the active formatting elements</a>,
      if any.</p>
 
-    <p><a href="#insert">Insert an HTML element</a> for the token.</p>
+    <p><a href="#insert0">Insert an HTML element</a> for the token.</p>
 
     <p>If the <a href="#form-element"><code title="">form</code> element
      pointer</a> is not null, then <span>associate</span><!--XXX
@@ -42777,7 +42778,7 @@
     <p><a href="#reconstruct">Reconstruct the active formatting elements</a>,
      if any.</p>
 
-    <p><a href="#insert">Insert an HTML element</a> for the token.</p>
+    <p><a href="#insert0">Insert an HTML element</a> for the token.</p>
 
     <p>If the <a href="#form-element"><code title="">form</code> element
      pointer</a> is not null, then <span>associate</span><!--XXX xref! -->
@@ -42823,7 +42824,7 @@
     <p><a href="#reconstruct">Reconstruct the active formatting elements</a>,
      if any.</p>
 
-    <p><a href="#insert">Insert an HTML element</a> for the token.</p>
+    <p><a href="#insert0">Insert an HTML element</a> for the token.</p>
 
     <p class=note>This element will be a <a href="#phrasing1">phrasing</a>
      element.</p>
@@ -42899,8 +42900,8 @@
      href="#tainted">tainted</a>, then act as described in the "anything
      else" entry below.</p>
 
-    <p>Otherwise, <a href="#append" title="append a character">append the
-     character</a> to the <a href="#current4">current node</a>.</p>
+    <p>Otherwise, <a href="#insert" title="insert a character">insert the
+     character</a> into the <a href="#current4">current node</a>.</p>
 
    <dt>A comment token
 
@@ -42930,7 +42931,7 @@
     <p>Insert a marker at the end of the <a href="#list-of4">list of active
      formatting elements</a>.</p>
 
-    <p><a href="#insert">Insert an HTML element</a> for the token, then
+    <p><a href="#insert0">Insert an HTML element</a> for the token, then
      switch the <a href="#insertion0">insertion mode</a> to "<a
      href="#in-caption" title="insertion mode: in caption">in caption</a>".</p>
 
@@ -42940,7 +42941,7 @@
     <p><a href="#clear1">Clear the stack back to a table context</a>. (See
      below.)</p>
 
-    <p><a href="#insert">Insert an HTML element</a> for the token, then
+    <p><a href="#insert0">Insert an HTML element</a> for the token, then
      switch the <a href="#insertion0">insertion mode</a> to "<a
      href="#in-column" title="insertion mode: in column group">in column
      group</a>".</p>
@@ -42957,7 +42958,7 @@
     <p><a href="#clear1">Clear the stack back to a table context</a>. (See
      below.)</p>
 
-    <p><a href="#insert">Insert an HTML element</a> for the token, then
+    <p><a href="#insert0">Insert an HTML element</a> for the token, then
      switch the <a href="#insertion0">insertion mode</a> to "<a
      href="#in-table0" title="insertion mode: in table body">in table
      body</a>".</p>
@@ -43013,7 +43014,7 @@
 
     <p><a href="#parse0">Parse error</a>.</p>
 
-    <p><a href="#insert">Insert an HTML element</a> for the token.</p>
+    <p><a href="#insert0">Insert an HTML element</a> for the token.</p>
 
     <p>If the <a href="#form-element"><code title="">form</code> element
      pointer</a> is not null, then <span>associate</span><!--XXX
@@ -43161,8 +43162,8 @@
     <!--U+000D CARRIAGE RETURN (CR),--> or U+0020 SPACE
 
    <dd>
-    <p><a href="#append" title="append a character">Append the character</a>
-     to the <a href="#current4">current node</a>.</p>
+    <p><a href="#insert" title="insert a character">Insert the character</a>
+     into the <a href="#current4">current node</a>.</p>
 
    <dt>A comment token
 
@@ -43186,7 +43187,7 @@
    <dt>A start tag whose tag name is "col"
 
    <dd>
-    <p><a href="#insert">Insert an HTML element</a> for the token.
+    <p><a href="#insert0">Insert an HTML element</a> for the token.
      Immediately pop the <a href="#current4">current node</a> off the <a
      href="#stack">stack of open elements</a>.</p>
 
@@ -43232,7 +43233,7 @@
     <p><a href="#clear2">Clear the stack back to a table body context</a>.
      (See below.)</p>
 
-    <p><a href="#insert">Insert an HTML element</a> for the token, then
+    <p><a href="#insert0">Insert an HTML element</a> for the token, then
      switch the <a href="#insertion0">insertion mode</a> to "<a
      href="#in-row" title="insertion mode: in row">in row</a>".</p>
 
@@ -43318,7 +43319,7 @@
     <p><a href="#clear3">Clear the stack back to a table row context</a>.
      (See below.)</p>
 
-    <p><a href="#insert">Insert an HTML element</a> for the token, then
+    <p><a href="#insert0">Insert an HTML element</a> for the token, then
      switch the <a href="#insertion0">insertion mode</a> to "<a
      href="#in-cell" title="insertion mode: in cell">in cell</a>".</p>
 
@@ -43505,8 +43506,8 @@
    <dt>A character token
 
    <dd>
-    <p><a href="#append" title="append a character">Append the token's
-     character</a> to the <a href="#current4">current node</a>.</p>
+    <p><a href="#insert" title="insert a character">Insert the token's
+     character</a> into the <a href="#current4">current node</a>.</p>
 
    <dt>A comment token
 
@@ -43533,7 +43534,7 @@
     <p>If the <a href="#current4">current node</a> is an <code>option</code>
      element, act as if an end tag with the tag name "option" had been seen.</p>
 
-    <p><a href="#insert">Insert an HTML element</a> for the token.</p>
+    <p><a href="#insert0">Insert an HTML element</a> for the token.</p>
 
    <dt>A start tag whose tag name is "optgroup"
 
@@ -43545,7 +43546,7 @@
      <code>optgroup</code> element, act as if an end tag with the tag name
      "optgroup" had been seen.</p>
 
-    <p><a href="#insert">Insert an HTML element</a> for the token.</p>
+    <p><a href="#insert0">Insert an HTML element</a> for the token.</p>
 
    <dt>An end tag whose tag name is "optgroup"
 
@@ -43688,8 +43689,8 @@
     <!--U+000D CARRIAGE RETURN (CR),--> or U+0020 SPACE
 
    <dd>
-    <p><a href="#append" title="append a character">Append the character</a>
-     to the <a href="#current4">current node</a>.</p>
+    <p><a href="#insert" title="insert a character">Insert the character</a>
+     into the <a href="#current4">current node</a>.</p>
 
    <dt>A comment token
 
@@ -43713,7 +43714,7 @@
    <dt>A start tag whose tag name is "frameset"
 
    <dd>
-    <p><a href="#insert">Insert an HTML element</a> for the token.</p>
+    <p><a href="#insert0">Insert an HTML element</a> for the token.</p>
 
    <dt>An end tag whose tag name is "frameset"
 
@@ -43736,7 +43737,7 @@
    <dt>A start tag whose tag name is "frame"
 
    <dd>
-    <p><a href="#insert">Insert an HTML element</a> for the token.
+    <p><a href="#insert0">Insert an HTML element</a> for the token.
      Immediately pop the <a href="#current4">current node</a> off the <a
      href="#stack">stack of open elements</a>.</p>
 
@@ -43771,8 +43772,8 @@
     <!--U+000D CARRIAGE RETURN (CR),--> or U+0020 SPACE
 
    <dd>
-    <p><a href="#append" title="append a character">Append the character</a>
-     to the <a href="#current4">current node</a>.</p>
+    <p><a href="#insert" title="insert a character">Insert the character</a>
+     into the <a href="#current4">current node</a>.</p>
 
    <dt>A comment token
 

Modified: source
===================================================================
--- source	2008-03-04 07:11:44 UTC (rev 1333)
+++ source	2008-03-04 07:25:17 UTC (rev 1334)
@@ -37738,11 +37738,13 @@
   has to render the <code>Document</code> so that it is available to
   the user, or when it has to begin accepting user input.</p>
 
-  <p>When the steps below require the UA to <dfn>append a
-  character</dfn> to a node, the UA must collect it and all subsequent
-  consecutive characters that would be appended to that node, and
-  insert one <code>Text</code> node whose data is the concatenation of
-  all those characters.</p>
+  <p>When the steps below require the UA to <dfn>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>Text</code> node, then the character must be appended to that
+  <code>Text</code> node; otherwise, a new <code>Text</code> node
+  whose data is just that character must be inserted in the
+  appropriate place.</p>
 
   <p id="mutation-during-parsing">DOM mutation events must not fire
   for changes caused by the UA parsing the document. (Conceptually,
@@ -38650,7 +38652,7 @@
    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
+    <p><span title="insert a character">Insert the character</span> into
     the <span>current node</span>.</p>
    </dd>
 
@@ -38978,7 +38980,7 @@
    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
+    <p><span title="insert a character">Insert the character</span> into
     the <span>current node</span>.</p>
    </dd>
 
@@ -39069,8 +39071,8 @@
     <p><span>Reconstruct the active formatting elements</span>, if
     any.</p>
 
-    <p><span title="append a character">Append the token's
-    character</span> to the <span>current node</span>.</p>
+    <p><span title="insert a character">Insert the token's
+    character</span> into the <span>current node</span>.</p>
 
    </dd>
 
@@ -40108,8 +40110,8 @@
     <p>If the <span>current table</span> is <span>tainted</span>, then
     act as described in the "anything else" entry below.</p>
 
-    <p>Otherwise, <span title="append a character">append the
-    character</span> to the <span>current node</span>.</p>
+    <p>Otherwise, <span title="insert a character">insert the
+    character</span> into the <span>current node</span>.</p>
 
    </dd>
 
@@ -40386,7 +40388,7 @@
    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
+    <p><span title="insert a character">Insert the character</span> into
     the <span>current node</span>.</p>
    </dd>
 
@@ -40760,8 +40762,8 @@
 
    <dt>A character token</dt>
    <dd>
-    <p><span title="append a character">Append the token's
-    character</span> to the <span>current node</span>.</p>
+    <p><span title="insert a character">Insert the token's
+    character</span> into the <span>current node</span>.</p>
    </dd>
 
    <dt>A comment token</dt>
@@ -40967,7 +40969,7 @@
    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
+    <p><span title="insert a character">Insert the character</span> into
     the <span>current node</span>.</p>
    </dd>
 
@@ -41054,7 +41056,7 @@
    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
+    <p><span title="insert a character">Insert the character</span> into
     the <span>current node</span>.</p>
    </dd>
 




More information about the Commit-Watchers mailing list