| 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 150d83e8ee55a5024ce24dfefe0bba853db8207c..957ec7c8a83c79ae0e53be712c6b12d069c411be 100644
|
| --- a/content/browser/renderer_host/input/web_input_event_util.cc
|
| +++ b/content/browser/renderer_host/input/web_input_event_util.cc
|
| @@ -9,6 +9,7 @@
|
|
|
| #include <cmath>
|
|
|
| +#include "base/float_util.h"
|
| #include "base/strings/string_util.h"
|
| #include "content/common/input/web_touch_event_traits.h"
|
| #include "ui/events/event_constants.h"
|
| @@ -235,6 +236,14 @@ WebTouchPoint CreateWebTouchPoint(const MotionEvent& event,
|
| touch.rotationAngle = orientation_deg + 90;
|
| }
|
|
|
| + float tilt = event.GetTilt(pointer_index);
|
| + touch.tilt = base::IsNaN(tilt) ?
|
| + std::numeric_limits<float>::quiet_NaN() : (180.f / M_PI * tilt);
|
| +
|
| + float tilt_direction = event.GetTiltDirection(pointer_index);
|
| + touch.tiltDirection = base::IsNaN(tilt_direction) ?
|
| + std::numeric_limits<float>::quiet_NaN() : (180.f / M_PI * tilt_direction);
|
| +
|
| touch.force = event.GetPressure(pointer_index);
|
|
|
| return touch;
|
|
|