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

Unified Diff: ash/drag_drop/drag_drop_controller.cc

Issue 1421713002: Explicitly convert Point to PointF for event code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@wip
Patch Set: pointfconvert-prod: . Created 5 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 | « ash/autoclick/autoclick_controller.cc ('k') | ash/drag_drop/drag_drop_tracker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/drag_drop/drag_drop_controller.cc
diff --git a/ash/drag_drop/drag_drop_controller.cc b/ash/drag_drop/drag_drop_controller.cc
index a863fa35f0768f5552f0cd126348c8386374fd77..9774da029c878c4ca1a6a21caf46b3e6ebffd626 100644
--- a/ash/drag_drop/drag_drop_controller.cc
+++ b/ash/drag_drop/drag_drop_controller.cc
@@ -51,15 +51,16 @@ gfx::Rect AdjustDragImageBoundsForScaleAndOffset(
int vertical_offset,
float scale,
gfx::Vector2d* drag_image_offset) {
- gfx::PointF final_origin = drag_image_bounds.origin();
+ gfx::Point final_origin = drag_image_bounds.origin();
gfx::SizeF final_size = gfx::SizeF(drag_image_bounds.size());
final_size.Scale(scale);
drag_image_offset->set_x(drag_image_offset->x() * scale);
drag_image_offset->set_y(drag_image_offset->y() * scale);
- float total_x_offset = drag_image_offset->x();
- float total_y_offset = drag_image_offset->y() - vertical_offset;
+ int total_x_offset = drag_image_offset->x();
+ int total_y_offset = drag_image_offset->y() - vertical_offset;
final_origin.Offset(-total_x_offset, -total_y_offset);
- return gfx::ToEnclosingRect(gfx::RectF(final_origin, final_size));
+ return gfx::ToEnclosingRect(
+ gfx::RectF(gfx::PointF(final_origin), final_size));
}
void DispatchGestureEndToWindow(aura::Window* window) {
« no previous file with comments | « ash/autoclick/autoclick_controller.cc ('k') | ash/drag_drop/drag_drop_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698