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

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
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..38305b46ef04dc6e42b8c5bb5cc2976ca8bfc4cf 100644
--- a/ash/drag_drop/drag_drop_controller.cc
+++ b/ash/drag_drop/drag_drop_controller.cc
@@ -51,8 +51,8 @@ gfx::Rect AdjustDragImageBoundsForScaleAndOffset(
int vertical_offset,
float scale,
gfx::Vector2d* drag_image_offset) {
- gfx::PointF final_origin = drag_image_bounds.origin();
- gfx::SizeF final_size = gfx::SizeF(drag_image_bounds.size());
+ gfx::PointF final_origin(drag_image_bounds.origin());
sky 2015/10/23 21:13:13 You don't need the floating point until the RectF
danakj 2015/10/23 21:46:10 Done.
+ gfx::SizeF final_size(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);

Powered by Google App Engine
This is Rietveld 408576698