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

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

Issue 2587393004: Add tangentialPressure and twist properties to PointerEvent on Mac (Closed)
Patch Set: pressure mac Created 3 years, 12 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 41a9d27b9d5356adfefeacef9ac57cbed7e64775..88d251b8e3e1c5b6151aa0986419b5f8734ba633 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
@@ -347,6 +347,8 @@ blink::WebMouseEvent WebMouseEventBuilder::Build(NSEvent* event, NSView* view) {
NSPoint tilt = [event tilt];
result.tiltX = lround(tilt.x * 90);
result.tiltY = lround(tilt.y * 90);
+ result.tangentialPressure = [event tangentialPressure];
+ result.twist = [event rotation];
mustaq 2017/01/03 19:09:24 The NSEvent spec doesn't specify the range at all,
lanwei 2017/01/05 16:13:40 Done. Yes, the value I saw is in this range.
}
return result;
}

Powered by Google App Engine
This is Rietveld 408576698