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

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: rebase Created 3 years, 11 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/external/wpt/pointerevents/idlharness-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 14754e24295c9131d224e65a1450fd55a8b075b9..11f434f7548f98d3bfb1ae1394551185e9a93fc9 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
@@ -344,6 +344,14 @@ 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];
+ // NSEvent spec doesn't specify the range of rotation, we make sure that
+ // this value is in the range of [0,359].
+ int twist = (int)[event rotation];
+ twist = twist % 360;
+ if (twist < 0)
+ twist += 360;
+ result.twist = twist;
}
return result;
}
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/external/wpt/pointerevents/idlharness-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698