<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>37016</bug_id>
          
          <creation_ts>2010-04-02 00:27:27 -0700</creation_ts>
          <short_desc>WebHTMLView.firstRectForCharacterRange returns wrong y for line beginning of multiline &lt;pre&gt;</short_desc>
          <delta_ts>2010-04-22 10:50:41 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKit API</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>UNCONFIRMED</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Hajime Morrita">morrita</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>207767</commentid>
    <comment_count>0</comment_count>
      <attachid>52394</attachid>
    <who name="Hajime Morrita">morrita</who>
    <bug_when>2010-04-02 00:27:27 -0700</bug_when>
    <thetext>Created attachment 52394
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 &quot;y:600&quot; 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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>215960</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2010-04-22 10:50:41 -0700</bug_when>
    <thetext>A problem observable via textInputController.firstRectForCharacterRange() would probably affect inline text input, too.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>52394</attachid>
            <date>2010-04-02 00:27:27 -0700</date>
            <delta_ts>2010-04-02 00:27:27 -0700</delta_ts>
            <desc>reproduce (for DRT)</desc>
            <filename>first-rect-after-set-position.html</filename>
            <type>text/html</type>
            <size>1557</size>
            <attacher name="Hajime Morrita">morrita</attacher>
            
              <data encoding="base64">PGh0bWw+CjxoZWFkPgogICAgPG1ldGEgaHR0cC1lcXVpdj0iQ29udGVudC1UeXBlIiBjb250ZW50
PSJ0ZXh0L2h0bWw7IGNoYXJzZXQ9dXRmLTgiPgogICAgPHNjcmlwdD4KICAgICAgICBpZiAod2lu
ZG93LmxheW91dFRlc3RDb250cm9sbGVyKQogICAgICAgICAgICBsYXlvdXRUZXN0Q29udHJvbGxl
ci5kdW1wQXNUZXh0KCk7CgogICAgICAgIGZ1bmN0aW9uIGxvZyhtZXNzYWdlKQogICAgICAgIHsK
ICAgICAgICAgICAgZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoImNvbnNvbGUiKS5hcHBlbmRDaGls
ZChkb2N1bWVudC5jcmVhdGVUZXh0Tm9kZShtZXNzYWdlICsgIlxuIikpOwogICAgICAgIH0KCiAg
ICAgICAgZnVuY3Rpb24gY2FyZXRDb29yZGluYXRlcygpCiAgICAgICAgewogICAgICAgICAgICBp
ZiAoIXdpbmRvdy50ZXh0SW5wdXRDb250cm9sbGVyKQogICAgICAgICAgICAgICAgcmV0dXJuIHsg
eDogMCwgeSA6MCB9OwogICAgICAgICAgICB2YXIgY2FyZXRSZWN0ID0gdGV4dElucHV0Q29udHJv
bGxlci5maXJzdFJlY3RGb3JDaGFyYWN0ZXJSYW5nZSh0ZXh0SW5wdXRDb250cm9sbGVyLnNlbGVj
dGVkUmFuZ2UoKVswXSwgMCk7CiAgICAgICAgICAgIHJldHVybiB7IHg6IGNhcmV0UmVjdFswXSwg
eTogY2FyZXRSZWN0WzFdIH07CiAgICAgICAgfQogICAgICAgCiAgICAgICAgb25sb2FkID0gZnVu
Y3Rpb24oKQogICAgICAgIHsKICAgICAgICAgICAgdmFyIHRlc3RzID0gZG9jdW1lbnQuZ2V0RWxl
bWVudHNCeUNsYXNzTmFtZSgidGVzdCIpOwogICAgICAgICAgICB2YXIgc2VsID0gZ2V0U2VsZWN0
aW9uKCk7CiAgICAgICAgICAgIGxvZyh0ZXN0cy5sZW5ndGgpOwogICAgICAgICAgICBmb3IgKHZh
ciBpID0gMDsgaSA8IHRlc3RzLmxlbmd0aDsgKytpKSB7CiAgICAgICAgICAgICAgICB0ZXN0c1tp
XS5mb2N1cygpOwogICAgICAgICAgICAgICAgbG9nKCJpOiIgKyBpKTsKICAgICAgICAgICAgICAg
IHNlbC5zZXRQb3NpdGlvbih0ZXN0c1tpXS5maXJzdENoaWxkLCAwKTsKICAgICAgICAgICAgICAg
IGZvciAodmFyIGo9MDsgaiA8IDc7IGorKykgewogICAgICAgICAgICAgICAgICAgc2VsLm1vZGlm
eSgibW92ZSIsICJmb3J3YXJkIiwgImNoYXJhY3RlciIpOwogICAgICAgICAgICAgICAgICAgdmFy
IHBvcyA9IGNhcmV0Q29vcmRpbmF0ZXMoKTsKICAgICAgICAgICAgICAgICAgIGxvZygieDoiICsg
cG9zLnggKyAiIHk6IiArICBwb3MueSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0K
ICAgICAgICB9CiAgICA8L3NjcmlwdD4KPC9oZWFkPgo8Ym9keT4KCjxkaXYgc3R5bGU9ImhlaWdo
dDogMjAwcHg7Ij5JZ25vcmUgbWU7IHRoaXMgYmxvY2sgaXMganVzdCBhIHBsYWNlIGhvbGRlciB0
byBtYWtlIHRoZSB0ZXN0IHJlc3VsdCBzaWduaWZpY2FudC48L2Rpdj4KCjxwcmUgY2xhc3M9InRl
c3QiIGNvbnRlbnRFZGl0YWJsZT5BQkMKREVGPC9wcmU+CjxwcmUgY2xhc3M9InRlc3QiIGNvbnRl
bnRFZGl0YWJsZT5hYmMKPCEtLSAtLT5kZWY8L2Rpdj4KCjxwcmUgaWQ9ImNvbnNvbGUiPjwvcHJl
Pgo8L2JvZHk+CjwvaHRtbD4K
</data>

          </attachment>
      

    </bug>

</bugzilla>