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

Unified Diff: ui/events/test/event_generator.cc

Issue 660173002: Type conversion fixes, ui/ edition. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 2 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 | « ui/events/test/event_generator.h ('k') | ui/events/win/events_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/test/event_generator.cc
diff --git a/ui/events/test/event_generator.cc b/ui/events/test/event_generator.cc
index ad9d597259c6e54c1372b16d766e40f28b211c88..8fae713ac17764827c9bed5006e3e16acad2ff38 100644
--- a/ui/events/test/event_generator.cc
+++ b/ui/events/test/event_generator.cc
@@ -301,9 +301,9 @@ void EventGenerator::GestureScrollSequenceWithCallback(
callback.Run(ui::ET_GESTURE_SCROLL_BEGIN, gfx::Vector2dF());
- int dx = (end.x() - start.x()) / steps;
- int dy = (end.y() - start.y()) / steps;
- gfx::Point location = start;
+ float dx = static_cast<float>(end.x() - start.x()) / steps;
+ float dy = static_cast<float>(end.y() - start.y()) / steps;
+ gfx::PointF location = start;
for (int i = 0; i < steps; ++i) {
location.Offset(dx, dy);
timestamp += step_delay;
@@ -436,7 +436,7 @@ void EventGenerator::ScrollSequence(const gfx::Point& start,
void EventGenerator::ScrollSequence(const gfx::Point& start,
const base::TimeDelta& step_delay,
- const std::vector<gfx::Point>& offsets,
+ const std::vector<gfx::PointF>& offsets,
int num_fingers) {
size_t steps = offsets.size();
base::TimeDelta timestamp = Now();
« no previous file with comments | « ui/events/test/event_generator.h ('k') | ui/events/win/events_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698