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

Unified Diff: ash/drag_drop/drag_drop_controller.cc

Issue 1423703002: Don't drop the floating point part of events when converting types. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « no previous file | ui/aura/window_targeter.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 cf69a9c63b1c89ea9bd221ef5c803b7205b48918..a863fa35f0768f5552f0cd126348c8386374fd77 100644
--- a/ash/drag_drop/drag_drop_controller.cc
+++ b/ash/drag_drop/drag_drop_controller.cc
@@ -263,10 +263,8 @@ void DragDropController::DragUpdate(aura::Window* target,
aura::client::DragDropDelegate* delegate =
aura::client::GetDragDropDelegate(drag_window_);
if (delegate) {
- ui::DropTargetEvent e(*drag_data_,
- event.location(),
- event.root_location(),
- drag_operation_);
+ ui::DropTargetEvent e(*drag_data_, event.location_f(),
+ event.root_location_f(), drag_operation_);
e.set_flags(event.flags());
delegate->OnDragEntered(e);
}
@@ -274,10 +272,8 @@ void DragDropController::DragUpdate(aura::Window* target,
aura::client::DragDropDelegate* delegate =
aura::client::GetDragDropDelegate(drag_window_);
if (delegate) {
- ui::DropTargetEvent e(*drag_data_,
- event.location(),
- event.root_location(),
- drag_operation_);
+ ui::DropTargetEvent e(*drag_data_, event.location_f(),
+ event.root_location_f(), drag_operation_);
e.set_flags(event.flags());
op = delegate->OnDragUpdated(e);
gfx::NativeCursor cursor = ui::kCursorNoDrop;
@@ -316,8 +312,8 @@ void DragDropController::Drop(aura::Window* target,
aura::client::DragDropDelegate* delegate =
aura::client::GetDragDropDelegate(target);
if (delegate) {
- ui::DropTargetEvent e(
- *drag_data_, event.location(), event.root_location(), drag_operation_);
+ ui::DropTargetEvent e(*drag_data_, event.location_f(),
+ event.root_location_f(), drag_operation_);
e.set_flags(event.flags());
drag_operation_ = delegate->OnPerformDrop(e);
if (drag_operation_ == 0)
@@ -420,8 +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_root_location = touch_offset_event.root_location();
+ gfx::PointF touch_offset_location = touch_offset_event.location_f();
+ gfx::PointF touch_offset_root_location = touch_offset_event.root_location_f();
touch_offset_location.Offset(0, kTouchDragImageVerticalOffset);
touch_offset_root_location.Offset(0, kTouchDragImageVerticalOffset);
touch_offset_event.set_location(touch_offset_location);
« no previous file with comments | « no previous file | ui/aura/window_targeter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698