[Webkit-unassigned] [Bug 16765] Range does not adjust endContainer and endOffset correctly after insertNode (Acid3 bug)

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Jan 12 19:51:02 PST 2008


http://bugs.webkit.org/show_bug.cgi?id=16765


eric at webkit.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ian at hixie.ch
            Summary|Range does not correctly    |Range does not adjust
                   |stringify with toString     |endContainer and endOffset
                   |(Acid3 test 12)             |correctly after insertNode
                   |                            |(Acid3 bug)




------- Comment #1 from eric at webkit.org  2008-01-12 19:51 PDT -------
Ok, I understand what's going on here, and I plan to fix it.  I need to make a
few test cases first, just to make sure.

Hixie is right, this is way under-specified, but I think Firefox's behavior is
correct here:

<p>12345</p>

Range:
startContainer: Text<12345>
startOffset: 2
endContainer: Text<12345>
endOffset: 3

range.toString() -> "3" // we get this part right.

range.insertNode(Text<ABCDE>)

FireFox does:
startContainer: Text<12>
startOffset: 2
endContainer: Text<345>
endOffset: 1

Safari does:
startContainer: Text<12>
startOffset: 2
endContainer: Text<12>
endOffset: 4

Again, the spec is not at all clear here, but I think FF's behavior makes more
sense.  Especially since our endOffset is off the end of the endContainer.


-- 
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