[webkit-reviews] review denied: [Bug 5401] [WebCoreBridge firstRectForDOMRange:] works incorrectly for the first character after a line wrap : [Attachment 4383] proposed patch

bugzilla-request-daemon at opendarwin.org bugzilla-request-daemon at opendarwin.org
Mon Jan 16 11:27:09 PST 2006


Alexey Proskuryakov <ap at nypop.com> has denied Justin Garcia
<justin.garcia at apple.com>'s request for review:
Bug 5401: [WebCoreBridge firstRectForDOMRange:] works incorrectly for the first
character after a line wrap
http://bugzilla.opendarwin.org/show_bug.cgi?id=5401

Attachment 4383: proposed patch
http://bugzilla.opendarwin.org/attachment.cgi?id=4383&action=edit

------- Additional Comments from Alexey Proskuryakov <ap at nypop.com>
firstRectForDOMRange is only used twice, for -[NSTextInput
firstRectForCharacterRange] and for -WebHTMLView characterIndexForPoint].

For -[NSTextInput firstRectForCharacterRange], the documentation says "If the
length of theRange is 0 (as it would be if there is nothing selected at the
insertion point), the rectangle will coincide with the insertion point, and its
width will be 0." When the insertion point is positioned at a line wrap, it is
normally diplayed at the beginning of the next line. Yes, it is possible to
position it at the end of the wrapped line with a mouse click, but it is less
common IMO.

For -[WebHTMLView characterIndexForPoint], downstream is certainly preferable:
it asks for single-character ranges, and expects to get non-empty rects.
Currently, characterIndexForPoint doesn't work for the first character after a
line wrap.



More information about the webkit-reviews mailing list