New issue
Advanced search Search tips

Issue 615122 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 3
Type: Bug

Blocking:
issue 613560



Sign in to add a comment

Identity the mouse pointer type from low-level events for Mac

Project Member Reported by lanwei@chromium.org, May 26 2016

Issue description

In WebMouseEventBuilder::Build for events sending from Mac, we need to identify the pointer type of the low-level events, NSEvent on Mac sending from mouse devices.

 

Comment 1 by lanwei@chromium.org, May 26 2016

Cc: ccameron@chromium.org
ccameron@, do you know if we can get the input device information from NSEvent? Thank you.
Based on the NSEvent docs, it looks like you just need to read the pointingDeviceType.
Status: Started (was: Assigned)
Project Member

Comment 4 by bugdroid1@chromium.org, Jun 8 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/74a646d254f3836d7df802857b5a926adc4ec87b

commit 74a646d254f3836d7df802857b5a926adc4ec87b
Author: lanwei <lanwei@chromium.org>
Date: Wed Jun 08 19:16:55 2016

We did not set the pointer type for WebMouseEvent, which is created from NSEvent in
WebMouseEventBuilder::Build. Now we set the pointer type based on the NSEvent's
type to see if it is a tablet event or subtype of a mouse event to see its input device.

Reference:
https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/EventOverview/EventObjectsTypes/EventObjectsTypes.html#//apple_ref/doc/uid/10000060i-CH4-SW4

BUG= 615122 

Review-Url: https://codereview.chromium.org/2022843002
Cr-Commit-Position: refs/heads/master@{#398635}

[modify] https://crrev.com/74a646d254f3836d7df802857b5a926adc4ec87b/content/browser/renderer_host/input/web_input_event_builders_mac.mm

Labels: Merge-Request-52

Comment 6 by tin...@google.com, Jun 9 2016

Labels: -Merge-Request-52 Merge-Approved-52 Hotlist-Merge-Approved
Your change meets the bar and is auto-approved for M52 (branch: 2743)
Project Member

Comment 7 by bugdroid1@chromium.org, Jun 9 2016

Labels: -merge-approved-52 merge-merged-2743
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f069916c1f350baa4b7f6f2c6b3d9236aa1bdb94

commit f069916c1f350baa4b7f6f2c6b3d9236aa1bdb94
Author: lanwei <lanwei@chromium.org>
Date: Thu Jun 09 22:16:06 2016

We did not set the pointer type for WebMouseEvent, which is created from NSEvent in WebMouseEventBuilder::Build. Now we set the pointer type based on the NSEvent's type to see if it is a tablet event or subtype of a mouse event to see its input device.

Reference:
https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/EventOverview/EventObjectsTypes/EventObjectsTypes.html#//apple_ref/doc/uid/10000060i-CH4-SW4

BUG= 615122 

Review-Url: https://codereview.chromium.org/2022843002
Cr-Commit-Position: refs/heads/master@{#398635}
(cherry picked from commit 74a646d254f3836d7df802857b5a926adc4ec87b)

Review URL: https://codereview.chromium.org/2056053002 .

Cr-Commit-Position: refs/branch-heads/2743@{#302}
Cr-Branched-From: 2b3ae3b8090361f8af5a611712fc1a5ab2de53cb-refs/heads/master@{#394939}

[modify] https://crrev.com/f069916c1f350baa4b7f6f2c6b3d9236aa1bdb94/content/browser/renderer_host/input/web_input_event_builders_mac.mm

Status: Fixed (was: Started)
Project Member

Comment 9 by bugdroid1@chromium.org, Jun 15 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f069916c1f350baa4b7f6f2c6b3d9236aa1bdb94

commit f069916c1f350baa4b7f6f2c6b3d9236aa1bdb94
Author: lanwei <lanwei@chromium.org>
Date: Thu Jun 09 22:16:06 2016

We did not set the pointer type for WebMouseEvent, which is created from NSEvent in WebMouseEventBuilder::Build. Now we set the pointer type based on the NSEvent's type to see if it is a tablet event or subtype of a mouse event to see its input device.

Reference:
https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/EventOverview/EventObjectsTypes/EventObjectsTypes.html#//apple_ref/doc/uid/10000060i-CH4-SW4

BUG= 615122 

Review-Url: https://codereview.chromium.org/2022843002
Cr-Commit-Position: refs/heads/master@{#398635}
(cherry picked from commit 74a646d254f3836d7df802857b5a926adc4ec87b)

Review URL: https://codereview.chromium.org/2056053002 .

Cr-Commit-Position: refs/branch-heads/2743@{#302}
Cr-Branched-From: 2b3ae3b8090361f8af5a611712fc1a5ab2de53cb-refs/heads/master@{#394939}

[modify] https://crrev.com/f069916c1f350baa4b7f6f2c6b3d9236aa1bdb94/content/browser/renderer_host/input/web_input_event_builders_mac.mm

Labels: Needs-Feedback
lanwei@, can you please let us know if this can be tested manually ?
Yes, please use this page http://rbyers.github.io/eventTest.html and choose only pointer in the config list on the top left. When you test, please enable Pointer Events Mac, Windows, Linux, Chrome OS, Android on the chrome://flags. Please check with mouse and a stylus device.
Labels: Hotlist-Input-Dev

Sign in to add a comment