<?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>5829</bug_id>
          
          <creation_ts>2005-11-25 14:31:52 -0800</creation_ts>
          <short_desc>REGRESSION: cursor tracking and hit testing in scrollable block don&apos;t take borders into account</short_desc>
          <delta_ts>2005-12-18 08:26:02 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Layout and Rendering</component>
          <version>420+</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.4</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P1</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>mitz</reporter>
          <assigned_to name="Beth Dakin">bdakin</assigned_to>
          <cc>bdakin</cc>
    
    <cc>vicki</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>24546</commentid>
    <comment_count>0</comment_count>
    <who name="">mitz</who>
    <bug_when>2005-11-25 14:31:52 -0800</bug_when>
    <thetext>Summary: cursor tracking and hit-testing for controls seem to be off by the width of the left/bottom 
border of a block that has overflow:auto or scroll.

To reproduce: open the testcase. Things to note:
1) the end of the scrollbar near the red square does not respond to clicking or dragging
2) clicking in the green rect near the edge of the scroll bar results in the following error in the console 
(if running a debug build): ERROR: KHTML says we hit a RenderWidget, but AppKit doesn&apos;t agree we hit 
the corresponding NSView
3) places where the cursor changes between arrow and I-beam along the line &quot;Choose one: &lt;option&gt; 
from the pop-up&quot;
4) places where the pop-up responds to clicks and places where clicking results in the above error</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>24547</commentid>
    <comment_count>1</comment_count>
      <attachid>4800</attachid>
    <who name="">mitz</who>
    <bug_when>2005-11-25 14:32:51 -0800</bug_when>
    <thetext>Created attachment 4800
testcase</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>24549</commentid>
    <comment_count>2</comment_count>
    <who name="">mitz</who>
    <bug_when>2005-11-25 15:10:26 -0800</bug_when>
    <thetext>I suspect that this is a regression from the fix for &lt;rdar://problem/3885711&gt; (bug 4047). In particular, 
the changes to RenderLayer::hitTestLayer which introduced borderLeft() and borderBottom() there.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>24556</commentid>
    <comment_count>3</comment_count>
      <attachid>4801</attachid>
    <who name="">mitz</who>
    <bug_when>2005-11-25 15:21:43 -0800</bug_when>
    <thetext>Created attachment 4801
don&apos;t add left and bottom borders when hit-testing</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>24557</commentid>
    <comment_count>4</comment_count>
      <attachid>4801</attachid>
    <who name="">mitz</who>
    <bug_when>2005-11-25 15:28:04 -0800</bug_when>
    <thetext>Comment on attachment 4801
don&apos;t add left and bottom borders when hit-testing

I checked that this doesn&apos;t affect the testcase for bug 4047.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>24561</commentid>
    <comment_count>5</comment_count>
      <attachid>4801</attachid>
    <who name="Maciej Stachowiak">mjs</who>
    <bug_when>2005-11-25 22:27:57 -0800</bug_when>
    <thetext>Comment on attachment 4801
don&apos;t add left and bottom borders when hit-testing

r=me</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>24593</commentid>
    <comment_count>6</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2005-11-26 16:47:39 -0800</bug_when>
    <thetext>Is there any way we could make a test case for this?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>24594</commentid>
    <comment_count>7</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2005-11-26 16:49:21 -0800</bug_when>
    <thetext>A DumpRenderTree test case, that is.  We have support for moving the mouse... There is probably a way to 
get the current cursor from JavaScript, if not, we could add that functionality to DumpRenderTree&apos;s 
layoutTestController</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>24876</commentid>
    <comment_count>8</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2005-11-29 09:39:07 -0800</bug_when>
    <thetext>I don&apos;t think it&apos;s easy to add querying the cursor to DumpRenderTree -- the OS doesn&apos;t even have a good 
way to inspect the current cursor.

But we can make a test that relies on hit testing rather than the cursor.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>24878</commentid>
    <comment_count>9</comment_count>
    <who name="Vicki Murley">vicki</who>
    <bug_when>2005-11-29 11:49:21 -0800</bug_when>
    <thetext>I committed this change.  I added the attached test case to the manual tests directory until we can find a 
better solution.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>26108</commentid>
    <comment_count>10</comment_count>
    <who name="">mitz</who>
    <bug_when>2005-12-18 08:26:02 -0800</bug_when>
    <thetext>I should have made a more extensive testcase -- this is still (or has become) broken in certain conditions. 
I am going to file a new bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>4800</attachid>
            <date>2005-11-25 14:32:51 -0800</date>
            <delta_ts>2005-11-25 14:32:51 -0800</delta_ts>
            <desc>testcase</desc>
            <filename>scrollBarHitTesting.html</filename>
            <type>text/html</type>
            <size>893</size>
            <attacher>mitz</attacher>
            
              <data encoding="base64">PGh0bWw+CjxoZWFkPgo8dGl0bGU+U2Nyb2xsIGJhciBoaXQtdGVzdGluZzwvdGl0bGU+CjwvaGVh
ZD4KPGJvZHk+CiAgICA8cD4KICAgICAgICBUaGUgbGVmdCBlbmQgb2YgdGhlIHNjcm9sbCBiYXIg
ZG9lcyBub3QgcmVzcG9uZCB0byBjbGlja2luZyBvciBkcmFnZ2luZy4KICAgICAgICBDbGlja2lu
ZyBpbiB0aGUgZ3JlZW4gcmVjdGFuZ2xlIHRvIHRoZSByaWdodCBvZiB0aGUgc2Nyb2xsIGJhciBy
ZXN1bHRzCiAgICAgICAgaW4gYW4gZXJyb3IgbWVzc2FnZS4KICAgIDwvcD4KICAgIDxkaXYgc3R5
bGU9Im92ZXJmbG93OiBhdXRvOyBoZWlnaHQ6NTBweDsgd2lkdGg6MzAwcHg7IGJvcmRlci1sZWZ0
OiBzb2xpZCByZWQgNTBweDsgYm9yZGVyLXJpZ2h0OiBzb2xpZCBncmVlbiAyMHB4OyI+CiAgICAg
ICAgPGRpdiBzdHlsZT0id2lkdGg6NDAwcHg7Ij5DaG9vc2Ugb25lOiA8c2VsZWN0PjxvcHRpb24+
b3B0aW9uPC9vcHRpb24+PC9zZWxlY3Q+IGZyb20gdGhlIHBvcC11cDwvZGl2PgogICAgPC9kaXY+
CiAgICA8cD4KICAgICAgICBUaGUgYm90dG9tIGVuZCBvZiB0aGUgc2Nyb2xsIGJhciBkb2VzIG5v
dCByZXNwb25kIHRvIGNsaWNraW5nIG9yIGRyYWdnaW5nLgogICAgICAgIENsaWNraW5nIGluIHRo
ZSBncmVlbiByZWN0YW5nbGUgYWJvdmUgdGhlIHNjcm9sbCBiYXIgcmVzdWx0cwogICAgICAgIGlu
IGFuIGVycm9yIG1lc3NhZ2UuCiAgICA8L3A+CiAgICA8ZGl2IHN0eWxlPSJvdmVyZmxvdzogYXV0
bzsgaGVpZ2h0OjMwMHB4OyB3aWR0aDo1MHB4OyBib3JkZXItYm90dG9tOiBzb2xpZCByZWQgNTBw
eDsgYm9yZGVyLXRvcDogc29saWQgZ3JlZW4gMjBweDsiPgogICAgICAgIDxkaXYgc3R5bGU9Imhl
aWdodDo0MDBweDsiPjwvZGl2PgogICAgPC9kaXY+CjwvYm9keT4=
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>4801</attachid>
            <date>2005-11-25 15:21:43 -0800</date>
            <delta_ts>2005-11-25 22:27:57 -0800</delta_ts>
            <desc>don&apos;t add left and bottom borders when hit-testing</desc>
            <filename>5829_guess1.patch</filename>
            <type>text/plain</type>
            <size>2036</size>
            <attacher>mitz</attacher>
            
              <data encoding="base64">SW5kZXg6IFdlYkNvcmUva2h0bWwvcmVuZGVyaW5nL3JlbmRlcl9sYXllci5jcHAKPT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PQpSQ1MgZmlsZTogL2N2cy9yb290L1dlYkNvcmUva2h0bWwvcmVuZGVyaW5nL3JlbmRlcl9sYXll
ci5jcHAsdgpyZXRyaWV2aW5nIHJldmlzaW9uIDEuMTI1CmRpZmYgLXAgLXUgLXIxLjEyNSBXZWJD
b3JlL2todG1sL3JlbmRlcmluZy9yZW5kZXJfbGF5ZXIuY3BwCi0tLSBXZWJDb3JlL2todG1sL3Jl
bmRlcmluZy9yZW5kZXJfbGF5ZXIuY3BwCTIxIE5vdiAyMDA1IDAxOjIwOjI1IC0wMDAwCTEuMTI1
CisrKyBXZWJDb3JlL2todG1sL3JlbmRlcmluZy9yZW5kZXJfbGF5ZXIuY3BwCTI1IE5vdiAyMDA1
IDIzOjIzOjE2IC0wMDAwCkBAIC0xMTE0LDggKzExMTQsOCBAQCBSZW5kZXJMYXllcjo6aGl0VGVz
dExheWVyKFJlbmRlckxheWVyKiByCiAgICAgLy8gTmV4dCB3ZSB3YW50IHRvIHNlZSBpZiB0aGUg
bW91c2UgcG9zIGlzIGluc2lkZSB0aGUgY2hpbGQgUmVuZGVyT2JqZWN0cyBvZiB0aGUgbGF5ZXIu
CiAgICAgaWYgKGNvbnRhaW5zUG9pbnQoeE1vdXNlUG9zLCB5TW91c2VQb3MsIGZnUmVjdCkgJiYg
CiAgICAgICAgIHJlbmRlcmVyKCktPmhpdFRlc3QoaW5mbywgeE1vdXNlUG9zLCB5TW91c2VQb3Ms
Ci0gIC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geU1vdXNlUG9zLCBiZ1JlY3QpICYmCiAgICAg
ICAgIHJlbmRlcmVyKCktPmhpdFRlc3QoaW5mbywgeE1vdXNlUG9zLCB5TW91c2VQb3MsCi0gICAg
ICAgICAgICAgICAgICAgICAgICAgICAgbGF5ZXJCb3VuZHMueCgpIC0gcmVuZGVyZXIoKS0+eFBv
cygpICsgbV9vYmplY3QtPmJvcmRlckxlZnQoKSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAg
ICBsYXllckJvdW5kcy55KCkgLSByZW5kZXJlcigpLT55UG9zKCkgKyBtX29iamVjdC0+Ym9yZGVy
VG9wRXh0cmEoKSAtIG1fb2JqZWN0LT5ib3JkZXJCb3R0b20oKSwKKyAgICAgICAgICAgICAgICAg
ICAgICAgICAgICBsYXllckJvdW5kcy54KCkgLSByZW5kZXJlcigpLT54UG9zKCksCisgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgbGF5ZXJCb3VuZHMueSgpIC0gcmVuZGVyZXIoKS0+eVBvcygp
ICsgbV9vYmplY3QtPmJvcmRlclRvcEV4dHJhKCksCiAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgSGl0VGVzdFNlbGYpKQogICAgICAgICByZXR1cm4gdGhpczsKIAo=
</data>
<flag name="review"
          id="892"
          type_id="1"
          status="+"
          setter="mjs"
    />
          </attachment>
      

    </bug>

</bugzilla>