[Webkit-unassigned] [Bug 16766] New: DOM Range doesn't correctly update when modifying contents (Acid3)
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sun Jan 6 17:54:35 PST 2008
http://bugs.webkit.org/show_bug.cgi?id=16766
Summary: DOM Range doesn't correctly update when modifying
contents (Acid3)
Product: WebKit
Version: 525+ (Nightly build)
Platform: Macintosh
OS/Version: Mac OS X 10.4
Status: NEW
Severity: Normal
Priority: P2
Component: New Bugs
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: proton at wiretapped.net
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('p');
p.appendChild(doc.createTextNode("12345"));
doc.body.appendChild(p);
var r = doc.createRange();
r.setEnd(doc.body, 1);
r.setStart(p.firstChild, 2);
assert(!r.collapsed, "collapsed is wrong at start");
assertEquals(r.commonAncestorContainer, doc.body,
"commonAncestorContainer is wrong at start");
assertEquals(r.startContainer, p.firstChild, "startContainer is wrong at
start");
assertEquals(r.startOffset, 2, "startOffset is wrong at start");
assertEquals(r.endContainer, doc.body, "endContainer is wrong at start");
assertEquals(r.endOffset, 1, "endOffset is wrong at start");
doc.body.removeChild(p);
assert(r.collapsed, "collapsed is wrong after deletion");
assertEquals(r.commonAncestorContainer, doc.body,
"commonAncestorContainer is wrong after deletion");
assertEquals(r.startContainer, doc.body, "startContainer is wrong after
deletion");
assertEquals(r.startOffset, 0, "startOffset is wrong after deletion");
assertEquals(r.endContainer, doc.body, "endContainer is wrong after
deletion");
assertEquals(r.endOffset, 0, "endOffset is wrong after deletion");
return 1;
--
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the webkit-unassigned
mailing list