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

Unified Diff: ui/app_list/views/apps_grid_view.cc

Issue 139983009: ui::LocatedEvent location() returns gfx::PointF (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Undo accidental change. Created 6 years, 8 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: ui/app_list/views/apps_grid_view.cc
diff --git a/ui/app_list/views/apps_grid_view.cc b/ui/app_list/views/apps_grid_view.cc
index 2c55642385e07e1362619c2ad5e58c0b432e8aa8..48932860038fdc4903bb27f9afe923e3860e9549 100644
--- a/ui/app_list/views/apps_grid_view.cc
+++ b/ui/app_list/views/apps_grid_view.cc
@@ -442,7 +442,7 @@ void AppsGridView::InitiateDrag(AppListItemView* view,
drag_view_ = view;
drag_view_init_index_ = GetIndexOfView(drag_view_);
- drag_view_offset_ = event.location();
+ drag_view_offset_ = gfx::ToFlooredPoint(event.location());
drag_start_page_ = pagination_model_->selected_page();
ExtractDragLocation(event, &drag_start_grid_view_);
drag_view_start_ = gfx::Point(drag_view_->x(), drag_view_->y());
@@ -1210,7 +1210,7 @@ void AppsGridView::ExtractDragLocation(const ui::LocatedEvent& event,
// For non-aura, root location is not clearly defined but |drag_view_| does
// not have the scale transform. So no round error would be introduced and
// it's okay to use View::ConvertPointToTarget.
- *drag_point = event.location();
+ *drag_point = gfx::ToFlooredPoint(event.location());
views::View::ConvertPointToTarget(drag_view_, this, drag_point);
#endif
}

Powered by Google App Engine
This is Rietveld 408576698