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

Unified Diff: ash/drag_drop/drag_drop_tracker.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: ash/drag_drop/drag_drop_tracker.cc
diff --git a/ash/drag_drop/drag_drop_tracker.cc b/ash/drag_drop/drag_drop_tracker.cc
index 193dc62054a930c675fb2a90c199f19ac460e70f..36234ab9531686405a0a58c1801afb859fdf7e0a 100644
--- a/ash/drag_drop/drag_drop_tracker.cc
+++ b/ash/drag_drop/drag_drop_tracker.cc
@@ -67,7 +67,7 @@ void DragDropTracker::TakeCapture() {
aura::Window* DragDropTracker::GetTarget(const ui::LocatedEvent& event) {
DCHECK(capture_window_.get());
- gfx::Point location_in_screen = event.location();
+ gfx::Point location_in_screen = gfx::ToFlooredPoint(event.location());
wm::ConvertPointToScreen(capture_window_.get(),
&location_in_screen);
aura::Window* root_window_at_point =
@@ -81,10 +81,10 @@ ui::LocatedEvent* DragDropTracker::ConvertEvent(
aura::Window* target,
const ui::LocatedEvent& event) {
DCHECK(capture_window_.get());
- gfx::Point target_location = event.location();
+ gfx::Point target_location = gfx::ToFlooredPoint(event.location());
aura::Window::ConvertPointToTarget(capture_window_.get(), target,
&target_location);
- gfx::Point location_in_screen = event.location();
+ gfx::Point location_in_screen = gfx::ToFlooredPoint(event.location());
ash::wm::ConvertPointToScreen(capture_window_.get(), &location_in_screen);
gfx::Point target_root_location = event.root_location();
aura::Window::ConvertPointToTarget(

Powered by Google App Engine
This is Rietveld 408576698