<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>15544</bug_id>
          
          <creation_ts>2012-01-13 15:54:51 +0000</creation_ts>
          <short_desc>Wrong node used for range adjustment in the remove mutation</short_desc>
          <delta_ts>2012-01-17 16:34:43 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebAppsWG</product>
          <component>DOM</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-node-remove</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Stig Halvorsen">stighal</reporter>
          <assigned_to name="Aryeh Gregor">ayg</assigned_to>
          <cc>ayg</cc>
    
    <cc>mike</cc>
    
    <cc>www-dom</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>62663</commentid>
    <comment_count>0</comment_count>
    <who name="Stig Halvorsen">stighal</who>
    <bug_when>2012-01-13 15:54:51 +0000</bug_when>
    <thetext>In step 2 and 3 in the description of the remove mutation in DOMCore [1], the spec states that:

 &quot;For each range whose start/end node is a descendant of _parent_, set its start/end to (parent, index).&quot;

That doesn&apos;t seem to be what browsers do.

What browsers do seems to be more like:

 &quot;For each range whose start/end node is a descendant of _child_, set its start/end to (parent, index).&quot;

Which makes more sense, since child is being removed here and boundary points under child will be gone after the mutation, and so setting them to an offset of the parent seems appropriate.

[1] http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-node-remove</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62812</commentid>
    <comment_count>1</comment_count>
    <who name="Aryeh Gregor">ayg</who>
    <bug_when>2012-01-17 16:34:43 +0000</bug_when>
    <thetext>Thanks!  I&apos;ve fixed it:

http://dvcs.w3.org/hg/domcore/rev/8fd99dd0579b</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>