Bug 64882

Summary: Document mouseover event reporting incorrect mouse button
Product: WebKit Reporter: Scott Graham <scottmg>
Component: UI EventsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: rniwa, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
report correct .which when button isn't down
none
fix test code per comments
none
disable test on mac/win
none
disable test on mac/win
none
disable test on mac/win none

Description Scott Graham 2011-07-20 12:00:16 PDT
In events received by a mouseover handler, event.which should be 0 when no mouse button is held down.

When no mouse button is held down, event.which is instead 1, indicating that the left mouse button is held, even though it isn't.

See also http://code.google.com/p/chromium/issues/detail?id=87473
Comment 1 Scott Graham 2011-07-20 12:07:17 PDT
Created attachment 101493 [details]
report correct .which when button isn't down
Comment 2 Eric Seidel (no email) 2011-07-20 13:59:13 PDT
Comment on attachment 101493 [details]
report correct .which when button isn't down

View in context: https://bugs.webkit.org/attachment.cgi?id=101493&action=review

OK.  Seems fine.

> LayoutTests/fast/events/mouseover-button-expected.txt:7
> +mouseover on frame1
> +mouseover on t6 which: 0
> +mouseover on t6 which: 1
> +mouseover on t6 which: 0
> +mouseover on t6 which: 2

These woudl be better with PASS/FAIL, etc.  js-test-pre.js can help you by giving you a shouldBe function, etc.

> LayoutTests/fast/events/mouseover-button.html:19
> +<a href="http://code.google.com/p/chromium/issues/detail?id=87473">cr 87473</a>

webkit bug?
Comment 3 Scott Graham 2011-07-20 15:27:36 PDT
Created attachment 101520 [details]
fix test code per comments
Comment 4 Eric Seidel (no email) 2011-07-20 15:47:25 PDT
Comment on attachment 101520 [details]
fix test code per comments

LGTM.
Comment 5 WebKit Review Bot 2011-07-20 16:15:46 PDT
Comment on attachment 101520 [details]
fix test code per comments

Clearing flags on attachment: 101520

Committed r91416: <http://trac.webkit.org/changeset/91416>
Comment 6 WebKit Review Bot 2011-07-20 16:15:50 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 Ryosuke Niwa 2011-07-21 11:32:51 PDT
The test added by this patch is failing on Mac and Windows ports because they don't keep track of which buttons were pressed.  We should either skip this test on those ports or move the test into platform/chromium.
Comment 8 Scott Graham 2011-07-21 11:45:53 PDT
Created attachment 101619 [details]
disable test on mac/win
Comment 9 WebKit Review Bot 2011-07-21 11:48:16 PDT
Attachment 101619 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/plat..." exit_code: 1

LayoutTests/ChangeLog:3:  Line contains tab character.  [whitespace/tab] [5]
LayoutTests/ChangeLog:1:  ChangeLog entry has no bug number  [changelog/bugnumber] [5]
Total errors found: 2 in 3 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 10 Scott Graham 2011-07-21 11:49:55 PDT
Created attachment 101621 [details]
disable test on mac/win
Comment 11 WebKit Review Bot 2011-07-21 11:52:26 PDT
Attachment 101621 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/plat..." exit_code: 1

LayoutTests/ChangeLog:1:  ChangeLog entry has no bug number  [changelog/bugnumber] [5]
Total errors found: 1 in 3 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 12 Scott Graham 2011-07-21 11:52:35 PDT
Created attachment 101622 [details]
disable test on mac/win
Comment 13 Ryosuke Niwa 2011-07-21 12:04:19 PDT
Comment on attachment 101622 [details]
disable test on mac/win

Clearing flags on attachment: 101622

Committed r91484: <http://trac.webkit.org/changeset/91484>
Comment 14 Ryosuke Niwa 2011-07-21 12:04:23 PDT
All reviewed patches have been landed.  Closing bug.