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

Unified Diff: content/shell/renderer/test_runner/event_sender.cc

Issue 316303002: Enable floating point touch co-ordinates in EventSender (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 | « content/shell/renderer/test_runner/event_sender.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/renderer/test_runner/event_sender.cc
diff --git a/content/shell/renderer/test_runner/event_sender.cc b/content/shell/renderer/test_runner/event_sender.cc
index 63cd6fe61f254ecd57173cc12ae05ae8fb098e0c..85dc450ec4af47e9bb298bf4d8d24a13359c5bd7 100644
--- a/content/shell/renderer/test_runner/event_sender.cc
+++ b/content/shell/renderer/test_runner/event_sender.cc
@@ -633,7 +633,7 @@ void EventSenderBindings::ReleaseTouchPoint(unsigned index) {
void EventSenderBindings::UpdateTouchPoint(unsigned index, double x, double y) {
if (sender_)
- sender_->UpdateTouchPoint(index, static_cast<int>(x), static_cast<int>(y));
+ sender_->UpdateTouchPoint(index, static_cast<float>(x), static_cast<float>(y));
}
void EventSenderBindings::CancelTouchPoint(unsigned index) {
@@ -1457,7 +1457,7 @@ void EventSender::ReleaseTouchPoint(unsigned index) {
touch_point->state = WebTouchPoint::StateReleased;
}
-void EventSender::UpdateTouchPoint(unsigned index, int x, int y) {
+void EventSender::UpdateTouchPoint(unsigned index, float x, float y) {
if (index >= touch_points_.size()) {
ThrowTouchPointError();
return;
@@ -1615,8 +1615,8 @@ void EventSender::AddTouchPoint(gin::Arguments* args) {
WebTouchPoint touch_point;
touch_point.state = WebTouchPoint::StatePressed;
- touch_point.position = WebFloatPoint(static_cast<int>(x),
- static_cast<int>(y));
+ touch_point.position = WebFloatPoint(static_cast<float>(x),
+ static_cast<float>(y));
touch_point.screenPosition = touch_point.position;
if (!args->PeekNext().IsEmpty()) {
@@ -1634,8 +1634,8 @@ void EventSender::AddTouchPoint(gin::Arguments* args) {
}
}
- touch_point.radiusX = static_cast<int>(radius_x);
- touch_point.radiusY = static_cast<int>(radius_y);
+ touch_point.radiusX = static_cast<float>(radius_x);
+ touch_point.radiusY = static_cast<float>(radius_y);
}
int lowest_id = 0;
« no previous file with comments | « content/shell/renderer/test_runner/event_sender.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698