Bug 12344 - NativeListBox: item hit testing does not account for top padding and border
Summary: NativeListBox: item hit testing does not account for top padding and border
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Nobody
URL: data:text/html,<select multiple style...
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-20 05:08 PST by mitz
Modified: 2007-01-22 17:54 PST (History)
0 users

See Also:


Attachments
[WIP] Patch w/o change log and test (2.76 KB, patch)
2007-01-22 11:02 PST, mitz
no flags Details | Formatted Diff | Diff
Another test case (729 bytes, text/html)
2007-01-22 11:04 PST, mitz
no flags Details
Patch, including test and change log (54.64 KB, patch)
2007-01-22 14:52 PST, mitz
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description mitz 2007-01-20 05:08:34 PST
RenderListBox::listIndexAtOffset() does not take top padding and border. To see the problem, open the URL and try to select items.
Comment 1 mitz 2007-01-22 11:02:24 PST
Created attachment 12608 [details]
[WIP] Patch w/o change log and test
Comment 2 mitz 2007-01-22 11:04:44 PST
Created attachment 12609 [details]
Another test case

This test case lets you play with autoscroll and with clicking below the last item.
Comment 3 David Kilzer (:ddkilzer) 2007-01-22 11:25:44 PST
Comment on attachment 12608 [details]
[WIP] Patch w/o change log and test

>+    return newOffset < numItems() ? newOffset : - 1;

Space between unary minus and one.
Comment 4 mitz 2007-01-22 14:52:17 PST
Created attachment 12615 [details]
Patch, including test and change log
Comment 5 Darin Adler 2007-01-22 16:33:28 PST
Comment on attachment 12615 [details]
Patch, including test and change log

Oh, my bad! Mitz told me about this and asked me to fix it in my patch!

This patch is full of maximum goodness.

r=me
Comment 6 Sam Weinig 2007-01-22 17:54:53 PST
Landed in r19037.