Bug 64882 - Document mouseover event reporting incorrect mouse button
Summary: Document mouseover event reporting incorrect mouse button
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: UI Events (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-20 12:00 PDT by Scott Graham
Modified: 2011-07-21 12:04 PDT (History)
2 users (show)

See Also:


Attachments
report correct .which when button isn't down (6.08 KB, patch)
2011-07-20 12:07 PDT, Scott Graham
no flags Details | Formatted Diff | Diff
fix test code per comments (6.17 KB, patch)
2011-07-20 15:27 PDT, Scott Graham
no flags Details | Formatted Diff | Diff
disable test on mac/win (1.71 KB, patch)
2011-07-21 11:45 PDT, Scott Graham
no flags Details | Formatted Diff | Diff
disable test on mac/win (1.72 KB, patch)
2011-07-21 11:49 PDT, Scott Graham
no flags Details | Formatted Diff | Diff
disable test on mac/win (1.77 KB, patch)
2011-07-21 11:52 PDT, Scott Graham
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.