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

Unified Diff: ash/drag_drop/drag_drop_controller.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_controller.cc
diff --git a/ash/drag_drop/drag_drop_controller.cc b/ash/drag_drop/drag_drop_controller.cc
index 4a2603f05309c9bef34dc3df07db606225f6e5a9..ababd68910834fedd697da06012dbc0ae6fd3c4c 100644
--- a/ash/drag_drop/drag_drop_controller.cc
+++ b/ash/drag_drop/drag_drop_controller.cc
@@ -261,7 +261,7 @@ void DragDropController::DragUpdate(aura::Window* target,
drag_window_->AddObserver(this);
if ((delegate = aura::client::GetDragDropDelegate(drag_window_))) {
ui::DropTargetEvent e(*drag_data_,
- event.location(),
+ gfx::ToFlooredPoint(event.location()),
event.root_location(),
drag_operation_);
e.set_flags(event.flags());
@@ -270,7 +270,7 @@ void DragDropController::DragUpdate(aura::Window* target,
} else {
if ((delegate = aura::client::GetDragDropDelegate(drag_window_))) {
ui::DropTargetEvent e(*drag_data_,
- event.location(),
+ gfx::ToFlooredPoint(event.location()),
event.root_location(),
drag_operation_);
e.set_flags(event.flags());
@@ -310,8 +310,10 @@ void DragDropController::Drop(aura::Window* target,
DCHECK(target == drag_window_);
if ((delegate = aura::client::GetDragDropDelegate(target))) {
- ui::DropTargetEvent e(
- *drag_data_, event.location(), event.root_location(), drag_operation_);
+ ui::DropTargetEvent e(*drag_data_,
+ gfx::ToFlooredPoint(event.location()),
+ event.root_location(),
+ drag_operation_);
e.set_flags(event.flags());
drag_operation_ = delegate->OnPerformDrop(e);
if (drag_operation_ == 0)
@@ -414,7 +416,8 @@ void DragDropController::OnGestureEvent(ui::GestureEvent* event) {
ui::GestureEvent touch_offset_event(*event,
static_cast<aura::Window*>(NULL),
static_cast<aura::Window*>(NULL));
- gfx::Point touch_offset_location = touch_offset_event.location();
+ gfx::Point touch_offset_location =
+ gfx::ToFlooredPoint(touch_offset_event.location());
gfx::Point touch_offset_root_location = touch_offset_event.root_location();
touch_offset_location.Offset(0, kTouchDragImageVerticalOffset);
touch_offset_root_location.Offset(0, kTouchDragImageVerticalOffset);

Powered by Google App Engine
This is Rietveld 408576698