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

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>16766</bug_id>
          
          <creation_ts>2008-01-06 17:54:35 -0800</creation_ts>
          <short_desc>DOM Range doesn&apos;t correctly update when modifying contents (Acid3)</short_desc>
          <delta_ts>2008-02-10 12:35:28 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>New Bugs</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.4</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>11997</dup_id>
          
          <bug_file_loc></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="Andrew Wellington">andrew</reporter>
          <assigned_to name="Darin Adler">darin</assigned_to>
          <cc>justin.garcia</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>66423</commentid>
    <comment_count>0</comment_count>
    <who name="Andrew Wellington">andrew</who>
    <bug_when>2008-01-06 17:54:35 -0800</bug_when>
    <thetext>This is related to http://bugs.webkit.org/show_bug.cgi?id=16764 but applies to changing the contents of the range not using the range API, but just directly messing with the DOM that contains the range.

Test 16: FAIL (collapsed is wrong after deletion)

      // test 16: Ranges under mutations: deletion
      var doc = getTestDocument();
      var p = doc.createElement(&apos;p&apos;);
      p.appendChild(doc.createTextNode(&quot;12345&quot;));
      doc.body.appendChild(p);
      var r = doc.createRange();
      r.setEnd(doc.body, 1);
      r.setStart(p.firstChild, 2);
      assert(!r.collapsed, &quot;collapsed is wrong at start&quot;);
      assertEquals(r.commonAncestorContainer, doc.body, &quot;commonAncestorContainer is wrong at start&quot;);
      assertEquals(r.startContainer, p.firstChild, &quot;startContainer is wrong at start&quot;);
      assertEquals(r.startOffset, 2, &quot;startOffset is wrong at start&quot;);
      assertEquals(r.endContainer, doc.body, &quot;endContainer is wrong at start&quot;);
      assertEquals(r.endOffset, 1, &quot;endOffset is wrong at start&quot;);
      doc.body.removeChild(p);
      assert(r.collapsed, &quot;collapsed is wrong after deletion&quot;);
      assertEquals(r.commonAncestorContainer, doc.body, &quot;commonAncestorContainer is wrong after deletion&quot;);
      assertEquals(r.startContainer, doc.body, &quot;startContainer is wrong after deletion&quot;);
      assertEquals(r.startOffset, 0, &quot;startOffset is wrong after deletion&quot;);
      assertEquals(r.endContainer, doc.body, &quot;endContainer is wrong after deletion&quot;);
      assertEquals(r.endOffset, 0, &quot;endOffset is wrong after deletion&quot;);
      return 1;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67102</commentid>
    <comment_count>1</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2008-01-13 02:23:51 -0800</bug_when>
    <thetext>ccing justin since he lives in the editing code so much.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67103</commentid>
    <comment_count>2</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2008-01-13 02:24:26 -0800</bug_when>
    <thetext>actually, I meant to CC justin on the one that I&apos;d solved, not the one I was about to solve. :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70110</commentid>
    <comment_count>3</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2008-02-10 12:35:28 -0800</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of 11997 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>