diff options
author | varunjain@chromium.org <varunjain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-20 19:56:53 +0000 |
---|---|---|
committer | varunjain@chromium.org <varunjain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-20 19:56:53 +0000 |
commit | b62986f02d8017d33f3caf4ffe1b5ca228375122 (patch) | |
tree | fd9945c0013379a1e4319755de466b9638b39da9 /ash/drag_drop | |
parent | 2399aa53835f2d4b554956ab13e0c6ae646d29b4 (diff) | |
download | chromium_src-b62986f02d8017d33f3caf4ffe1b5ca228375122.zip chromium_src-b62986f02d8017d33f3caf4ffe1b5ca228375122.tar.gz chromium_src-b62986f02d8017d33f3caf4ffe1b5ca228375122.tar.bz2 |
Fix a couple of drag drop bugs:
1. When dragging over BrowserRootView, we must sanitize the dragged string
before querying Autocomplete.
2. We may receive un-expected events during drag drop session if the user
moves out of the root window.
BUG=110733
TEST=chrome no longer crashes on drag drop.
Review URL: http://codereview.chromium.org/9270001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118470 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/drag_drop')
-rw-r--r-- | ash/drag_drop/drag_drop_controller.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ash/drag_drop/drag_drop_controller.cc b/ash/drag_drop/drag_drop_controller.cc index cfb12db..c2db4ac 100644 --- a/ash/drag_drop/drag_drop_controller.cc +++ b/ash/drag_drop/drag_drop_controller.cc @@ -122,6 +122,7 @@ void DragDropController::DragUpdate(aura::Window* target, void DragDropController::Drop(aura::Window* target, const aura::MouseEvent& event) { + RootWindow::GetInstance()->SetCursor(aura::kCursorPointer); aura::client::DragDropDelegate* delegate = NULL; DCHECK(target == dragged_window_); if ((delegate = aura::client::GetDragDropDelegate(dragged_window_))) { @@ -141,6 +142,7 @@ void DragDropController::Drop(aura::Window* target, } void DragDropController::DragCancel() { + RootWindow::GetInstance()->SetCursor(aura::kCursorPointer); Cleanup(); drag_operation_ = 0; StartCanceledAnimation(); @@ -172,7 +174,8 @@ bool DragDropController::PreHandleMouseEvent(aura::Window* target, DragCancel(); break; default: - NOTREACHED(); + // We could reach here if the user drops outside the root window. + DragCancel(); break; } return true; |