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

Unified Diff: content/renderer/pepper/event_conversion.cc

Issue 1218663006: Use new WebTouchPoint field names. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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/renderer/pepper/event_conversion.cc
diff --git a/content/renderer/pepper/event_conversion.cc b/content/renderer/pepper/event_conversion.cc
index d09e04cded061d008dc3df27e35cd6cefe1d46fa..55f4e1a911172751d3e0b30b0c01221de2e910c4 100644
--- a/content/renderer/pepper/event_conversion.cc
+++ b/content/renderer/pepper/event_conversion.cc
@@ -242,13 +242,13 @@ void SetPPTouchPoints(const WebTouchPoint* touches,
continue;
}
PP_TouchPoint pp_pt;
- pp_pt.id = touch_point.id;
+ pp_pt.id = touch_point.pointerId;
pp_pt.position.x = touch_point.position.x;
pp_pt.position.y = touch_point.position.y;
- pp_pt.radius.x = touch_point.radiusX;
- pp_pt.radius.y = touch_point.radiusY;
+ pp_pt.radius.x = touch_point.width;
+ pp_pt.radius.y = touch_point.height;
pp_pt.rotation_angle = touch_point.rotationAngle;
- pp_pt.pressure = touch_point.force;
+ pp_pt.pressure = touch_point.pressure;
result->push_back(pp_pt);
}
}
@@ -276,15 +276,15 @@ void AppendTouchEvent(const WebInputEvent& event,
WebTouchPoint CreateWebTouchPoint(const PP_TouchPoint& pp_pt,
WebTouchPoint::State state) {
WebTouchPoint pt;
- pt.id = pp_pt.id;
+ pt.pointerId = pp_pt.id;
pt.position.x = pp_pt.position.x;
pt.position.y = pp_pt.position.y;
// TODO bug:http://code.google.com/p/chromium/issues/detail?id=93902
pt.screenPosition.x = 0;
pt.screenPosition.y = 0;
- pt.force = pp_pt.pressure;
- pt.radiusX = pp_pt.radius.x;
- pt.radiusY = pp_pt.radius.y;
+ pt.pressure = pp_pt.pressure;
+ pt.width = pp_pt.radius.x;
+ pt.height = pp_pt.radius.y;
pt.rotationAngle = pp_pt.rotation_angle;
pt.state = state;
return pt;
@@ -296,7 +296,7 @@ bool HasTouchPointWithId(const WebTouchPoint* web_touches,
// Note: A brute force search to find the (potentially) existing touch point
// is cheap given the small bound on |WebTouchEvent::touchesLengthCap|.
for (uint32_t i = 0; i < web_touches_length; ++i) {
- if (web_touches[i].id == static_cast<int>(id))
+ if (web_touches[i].pointerId == static_cast<int>(id))
return true;
}
return false;
« no previous file with comments | « content/common/input/web_input_event_traits_unittest.cc ('k') | content/renderer/pepper/event_conversion_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698