Bug 184913 - [GTK] Implement MouseEvent.buttons
Summary: [GTK] Implement MouseEvent.buttons
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: Gtk
Depends on:
Blocks: 174616
  Show dependency treegraph
 
Reported: 2018-04-24 06:27 PDT by Carlos Garcia Campos
Modified: 2018-04-25 03:17 PDT (History)
3 users (show)

See Also:


Attachments
Patch (14.68 KB, patch)
2018-04-24 06:34 PDT, Carlos Garcia Campos
zan: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Garcia Campos 2018-04-24 06:27:49 PDT
It's currently returning always 0 for WebKitGTK+.

https://www.w3.org/TR/uievents/#ref-for-dom-mouseevent-buttons-1
Comment 1 Carlos Garcia Campos 2018-04-24 06:34:39 PDT
Created attachment 338644 [details]
Patch
Comment 2 Ms2ger (he/him; ⌚ UTC+1/+2) 2018-04-25 01:09:31 PDT
Comment on attachment 338644 [details]
Patch

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

> Source/WebKit/Shared/gtk/WebEventFactory.cpp:154
> +        unsigned modifier = 1 << (8 + event->button.button - 1);

I've seen this calculation about five times in this patch; worth writing a small helper function?
Comment 3 Carlos Garcia Campos 2018-04-25 03:17:11 PDT
Committed r230988: <https://trac.webkit.org/changeset/230988>