Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3854)

Unified Diff: content/browser/renderer_host/input/web_input_event_builders_mac.mm

Issue 2739773004: Make stylus's eraser button work on Mac (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/input/web_input_event_builders_mac.mm
diff --git a/content/browser/renderer_host/input/web_input_event_builders_mac.mm b/content/browser/renderer_host/input/web_input_event_builders_mac.mm
index 383e02c52f432cdd86e9eab44a10b7c83adccc3f..25be0f5655c762a5e3838ebd12455b4bc9380859 100644
--- a/content/browser/renderer_host/input/web_input_event_builders_mac.mm
+++ b/content/browser/renderer_host/input/web_input_event_builders_mac.mm
@@ -321,11 +321,11 @@ blink::WebMouseEvent WebMouseEventBuilder::Build(
result.button = button;
SetWebEventLocationFromEventInView(&result, event, view);
+ result.pointerType = pointerType;
// For NSMouseExited and NSMouseEntered events, they do not have a subtype.
mustaq 2017/03/13 14:41:38 This comment and the comment in the next block no
// We decide their pointer types by checking if we recevied a
// NSTabletProximity event.
if (type == NSMouseExited || type == NSMouseEntered) {
- result.pointerType = pointerType;
return result;
}
@@ -334,13 +334,11 @@ blink::WebMouseEvent WebMouseEventBuilder::Build(
NSEventSubtype subtype = [event subtype];
if (subtype != NSTabletPointEventSubtype &&
subtype != NSTabletProximityEventSubtype) {
- result.pointerType = blink::WebPointerProperties::PointerType::Mouse;
return result;
}
// Set stylus properties for events with a subtype of
// NSTabletPointEventSubtype.
- result.pointerType = blink::WebPointerProperties::PointerType::Pen;
result.id = [event deviceID];
if (subtype == NSTabletPointEventSubtype) {
result.force = [event pressure];

Powered by Google App Engine
This is Rietveld 408576698