[Webkit-unassigned] [Bug 20738] New: compareBoundaryPoints gives incorrect results
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Sep 8 19:24:47 PDT 2008
https://bugs.webkit.org/show_bug.cgi?id=20738
Summary: compareBoundaryPoints gives incorrect results
Product: WebKit
Version: 525.x (Safari 3.1)
Platform: PC
URL: http://www.h4x0r5.com/~ryan/bug/bug.html
OS/Version: Windows Vista
Status: UNCONFIRMED
Severity: Normal
Priority: P2
Component: HTML DOM
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: rda at google.com
If I have a fragment like this:
<div id='nonselected'>
<p>This is some text that won't show up.</p>
</div>
<div id='text'>
<p>Here is some text</p>
<p>And some more</p>
</div>
And two ranges, one set to exactly the node with id = 'text' (called
text_range), and the other with a selection contained inside it (say, a text
range containing "some more", called selection), and we call:
selection.compareBoundaryPoints(Range.START_TO_END, text_range) gives -1
instead of 1, which appears to be incorrect. (At the very least, it conflicts
with how Firefox returns this. The w3c documentation appears to define
START_TO_END as "the start of text_range compared to the end of selection",
but, then the return value reverses the *order* of the two (e.g, selection's
end vs text_range's start), and I think webkit has merely confused START_TO_END
vs END_TO_START's definition.
--
Configure bugmail: https://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