Bug 201445 - [Win] Add support for MouseEvent.buttons
Summary: [Win] Add support for MouseEvent.buttons
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Fujii Hironori
URL:
Keywords: InRadar
Depends on: 178214
Blocks: 197232
  Show dependency treegraph
 
Reported: 2019-09-03 20:41 PDT by Fujii Hironori
Modified: 2019-09-05 19:41 PDT (History)
8 users (show)

See Also:


Attachments
test case (734 bytes, text/html)
2019-09-03 20:41 PDT, Fujii Hironori
no flags Details
Patch (6.04 KB, patch)
2019-09-03 21:13 PDT, Fujii Hironori
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews210 for win-future (7.11 MB, application/zip)
2019-09-03 22:09 PDT, EWS Watchlist
no flags Details
Patch (4.53 KB, patch)
2019-09-05 00:29 PDT, Fujii Hironori
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Fujii Hironori 2019-09-03 20:41:47 PDT
Created attachment 377952 [details]
test case

[Win] Add support for MouseEvent.buttons

https://www.w3.org/TR/uievents/#dom-mouseevent-buttons

Bug 178214 – [Mac] Add support for MouseEvent.buttons
Bug 191481 – REGRESSION(r223264): [GTK] Unable to drag documents on Google Drive
Comment 1 Fujii Hironori 2019-09-03 20:43:24 PDT
another test case: https://jsfiddle.net/fujihiro/vy7hkpLw/10/embedded/result/
Comment 2 Fujii Hironori 2019-09-03 21:13:42 PDT
Created attachment 377954 [details]
Patch
Comment 3 Brent Fulgham 2019-09-03 21:21:21 PDT
Comment on attachment 377954 [details]
Patch

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

> Source/WebCore/platform/win/PlatformMouseEventWin.cpp:92
> +}

Could we put this helper somewhere like GDIUtilities.h?
Comment 4 EWS Watchlist 2019-09-03 22:09:28 PDT
Comment on attachment 377954 [details]
Patch

Attachment 377954 [details] did not pass win-ews (win):
Output: https://webkit-queues.webkit.org/results/12995131

Number of test failures exceeded the failure limit.
Comment 5 EWS Watchlist 2019-09-03 22:09:30 PDT
Created attachment 377956 [details]
Archive of layout-test-results from ews210 for win-future

The attached test failures were seen while running run-webkit-tests on the win-ews.
Bot: ews210  Port: win-future  Platform: CYGWIN_NT-10.0-17763-3.0.5-338.x86_64-x86_64-64bit
Comment 6 Brent Fulgham 2019-09-04 09:18:59 PDT
Comment on attachment 377954 [details]
Patch

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

> Source/WebCore/platform/win/PlatformMouseEventWin.cpp:121
> +            m_button = NoButton;

This change seems to break AppleWin (editing and drag/drop operations). Do those tests need to be rebased? Is WebKit relying on behavior that is counter to the spec?

The tests that are failing related to editing/selection and dragging. I know that dragging involves mouse moves with the left button held down; I suspect this change breaks those tests because MouseMove (after this change) always has NoButton.

I don't think this change is correct.
Comment 7 Fujii Hironori 2019-09-05 00:12:30 PDT
Oh..

Filed:

Bug 201496 – MouseEvent.button should be 0 for mousemove events
Bug 201497 – WheelEvent should set buttons property properly because it is a subclass of MouseEvent
Comment 8 Fujii Hironori 2019-09-05 00:29:58 PDT
Created attachment 378054 [details]
Patch

* Addressed the review feedback.
Comment 9 Brent Fulgham 2019-09-05 19:35:12 PDT
Comment on attachment 378054 [details]
Patch

r=me
Comment 10 Fujii Hironori 2019-09-05 19:40:23 PDT
Comment on attachment 378054 [details]
Patch

Clearing flags on attachment: 378054

Committed r249560: <https://trac.webkit.org/changeset/249560>
Comment 11 Fujii Hironori 2019-09-05 19:40:27 PDT
All reviewed patches have been landed.  Closing bug.
Comment 12 Radar WebKit Bug Importer 2019-09-05 19:41:21 PDT
<rdar://problem/55096934>