| Index: content/renderer/pepper/event_conversion.cc
|
| diff --git a/content/renderer/pepper/event_conversion.cc b/content/renderer/pepper/event_conversion.cc
|
| index 452b6caae5d1c324fae941c7ac6ec614ca9255c6..5b15f8072bb6f418e53abab8db2233f45532be30 100644
|
| --- a/content/renderer/pepper/event_conversion.cc
|
| +++ b/content/renderer/pepper/event_conversion.cc
|
| @@ -29,6 +29,7 @@
|
| #include "ui/events/keycodes/dom/keycode_converter.h"
|
|
|
| using ppapi::InputEventData;
|
| +using ppapi::TouchPointWithTilt;
|
| using blink::WebInputEvent;
|
| using blink::WebKeyboardEvent;
|
| using blink::WebMouseEvent;
|
| @@ -244,7 +245,7 @@ enum IncludedTouchPointTypes {
|
| void SetPPTouchPoints(const WebTouchPoint* touches,
|
| uint32_t touches_length,
|
| IncludedTouchPointTypes included_types,
|
| - std::vector<PP_TouchPoint>* result) {
|
| + std::vector<TouchPointWithTilt>* result) {
|
| for (uint32_t i = 0; i < touches_length; i++) {
|
| const WebTouchPoint& touch_point = touches[i];
|
| if (included_types == ACTIVE &&
|
| @@ -265,7 +266,11 @@ void SetPPTouchPoints(const WebTouchPoint* touches,
|
| pp_pt.radius.y = touch_point.radius_y;
|
| pp_pt.rotation_angle = touch_point.rotation_angle;
|
| pp_pt.pressure = touch_point.force;
|
| - result->push_back(pp_pt);
|
| + PP_FloatPoint pp_ft;
|
| + pp_ft.x = touch_point.tilt_x;
|
| + pp_ft.y = touch_point.tilt_y;
|
| + TouchPointWithTilt touch_with_tilt{pp_pt, pp_ft};
|
| + result->push_back(touch_with_tilt);
|
| }
|
| }
|
|
|
| @@ -326,10 +331,11 @@ bool HasTouchPointWithId(const WebTouchPoint* web_touches,
|
| return false;
|
| }
|
|
|
| -void SetWebTouchPointsIfNotYetSet(const std::vector<PP_TouchPoint>& pp_touches,
|
| - WebTouchPoint::State state,
|
| - WebTouchPoint* web_touches,
|
| - uint32_t* web_touches_length) {
|
| +void SetWebTouchPointsIfNotYetSet(
|
| + const std::vector<TouchPointWithTilt>& pp_touches,
|
| + WebTouchPoint::State state,
|
| + WebTouchPoint* web_touches,
|
| + uint32_t* web_touches_length) {
|
| const uint32_t initial_web_touches_length = *web_touches_length;
|
| const uint32_t touches_length =
|
| std::min(static_cast<uint32_t>(pp_touches.size()),
|
| @@ -339,7 +345,7 @@ void SetWebTouchPointsIfNotYetSet(const std::vector<PP_TouchPoint>& pp_touches,
|
| if (touch_index >= static_cast<uint32_t>(WebTouchEvent::kTouchesLengthCap))
|
| return;
|
|
|
| - const PP_TouchPoint& pp_pt = pp_touches[i];
|
| + const PP_TouchPoint& pp_pt = pp_touches[i].touch;
|
| if (HasTouchPointWithId(web_touches, initial_web_touches_length, pp_pt.id))
|
| continue;
|
|
|
|
|