Bug 37016 - WebHTMLView.firstRectForCharacterRange returns wrong y for line beginning of multiline <pre>
Summary: WebHTMLView.firstRectForCharacterRange returns wrong y for line beginning of ...
Status: UNCONFIRMED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit API (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P3 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-02 00:27 PDT by Hajime Morrita
Modified: 2010-04-22 10:50 PDT (History)
1 user (show)

See Also:


Attachments
reproduce (for DRT) (1.52 KB, text/html)
2010-04-02 00:27 PDT, Hajime Morrita
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hajime Morrita 2010-04-02 00:27:27 PDT
Created attachment 52394 [details]
reproduce (for DRT)

WebHTMLView.firstRectForCharacterRange returns NSRect with wrong y value.
To reproduce, run attached file on DRT, that will results following text: 
You can see a pump "y:600" on y value at the beginning of the line.

----
Ignore me; this block is just a place holder to make the test result significant.
ABC
DEF
abc
def

2
i:0
x:16 y:364
x:24 y:364
x:32 y:364
x:8 y:349
x:16 y:349
x:24 y:349
x:32 y:349
i:1
x:16 y:321
x:24 y:321
x:32 y:321
x:0 y:600
x:16 y:306
x:24 y:306
x:32 y:306
----

This problem is observable only from WebKit API, and not visible from DOM.
The test case uses textInputController.firstRectForCharacterRange() to reveal it.

The expectation for LayoutTest/editing/selection/move-left-right.html is also suffered by this problem,
although its difference is minor issue for that  test case.
Comment 1 Alexey Proskuryakov 2010-04-22 10:50:41 PDT
A problem observable via textInputController.firstRectForCharacterRange() would probably affect inline text input, too.