Clarify a step in the wrap algorithm
authorAryeh Gregor <AryehGregor+gitcommit@gmail.com>
Wed, 03 Aug 2011 13:31:38 -0600
changeset 491 9eadbd256e0e
parent 490 c376830c28ef
child 492 02c347df78f6
Clarify a step in the wrap algorithm

Reported-By: Ryosuke Niwa
Report-URL: http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2011-August/032782.html
editing.html
source.html
--- a/editing.html	Wed Aug 03 13:25:59 2011 -0600
+++ b/editing.html	Wed Aug 03 13:31:38 2011 -0600
@@ -1073,7 +1073,13 @@
 
   <p>If <var title="">new parent</var> is null, abort these steps and return null.
 
-  <li>If <var title="">new parent</var>'s <a class=external data-anolis-spec=domcore href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-tree-parent title=concept-tree-parent>parent</a> is null:
+  <li><p class=comments>Most callers will create a new element to return in
+  <var title="">new parent instructions</var>, whose parent will therefore be null.  But
+  they can also return an existing node if that makes sense, so the nodes will
+  be moved to an uncle or something.  The toggle lists algorithm makes use of
+  this.
+
+  <p>If <var title="">new parent</var>'s <a class=external data-anolis-spec=domcore href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-tree-parent title=concept-tree-parent>parent</a> is null:
 
   <ol>
     <li>Insert <var title="">new parent</var> into the <a class=external data-anolis-spec=domcore href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-tree-parent title=concept-tree-parent>parent</a> of the first member of
--- a/source.html	Wed Aug 03 13:25:59 2011 -0600
+++ b/source.html	Wed Aug 03 13:31:38 2011 -0600
@@ -1027,7 +1027,13 @@
 
   <p>If <var>new parent</var> is null, abort these steps and return null.
 
-  <li>If <var>new parent</var>'s [[parent]] is null:
+  <li><p class=comments>Most callers will create a new element to return in
+  <var>new parent instructions</var>, whose parent will therefore be null.  But
+  they can also return an existing node if that makes sense, so the nodes will
+  be moved to an uncle or something.  The toggle lists algorithm makes use of
+  this.
+
+  <p>If <var>new parent</var>'s [[parent]] is null:
 
   <ol>
     <li>Insert <var>new parent</var> into the [[parent]] of the first member of