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

Unified Diff: content/browser/renderer_host/input/web_input_event_util.cc

Issue 755403006: Added experimental Touch.tilt, Touch.tiltDirection support for Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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_util.cc
diff --git a/content/browser/renderer_host/input/web_input_event_util.cc b/content/browser/renderer_host/input/web_input_event_util.cc
index 3d5386a15c85a4da19027d6c24a982eb77b5a2a2..a8272117081827e85cb0863b9090280695c5b943 100644
--- a/content/browser/renderer_host/input/web_input_event_util.cc
+++ b/content/browser/renderer_host/input/web_input_event_util.cc
@@ -231,6 +231,7 @@ WebTouchPoint CreateWebTouchPoint(const MotionEvent& event,
touch.rotationAngle = orientation_deg + 90;
}
+ touch.tilt = event.GetTilt(pointer_index) * 180.f / M_PI;
touch.force = event.GetPressure(pointer_index);
return touch;

Powered by Google App Engine
This is Rietveld 408576698