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

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

Issue 806883004: Revert "Fix crash after Launcher drag/drop" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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/app_list/views/apps_grid_view_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 5454498cf8e511b7e3f5a0971ae840b15972b269..bc200c6bcc63d4757793fd8a317805db4c28bd22 100644
--- a/ui/app_list/views/apps_grid_view.cc
+++ b/ui/app_list/views/apps_grid_view.cc
@@ -708,19 +708,17 @@ void AppsGridView::EndDrag(bool cancel) {
// If we had a drag and drop proxy icon, we delete it and make the real
// item visible again.
drag_and_drop_host_->DestroyDragIconProxy();
- // Issue 439055: MoveItemToFolder() can sometimes delete drag_view_
- if (drag_view_) {
- if (landed_in_drag_and_drop_host) {
- // Move the item directly to the target location, avoiding the
- // "zip back" animation if the user was pinning it to the shelf.
- int i = reorder_drop_target_.slot;
- gfx::Rect bounds = view_model_.ideal_bounds(i);
- drag_view_->SetBoundsRect(bounds);
- }
- // Fade in slowly if it landed in the shelf.
- SetViewHidden(drag_view_, false /* show */,
- !landed_in_drag_and_drop_host /* animate */);
+ if (landed_in_drag_and_drop_host) {
+ // Move the item directly to the target location, avoiding the "zip back"
+ // animation if the user was pinning it to the shelf.
+ int i = reorder_drop_target_.slot;
+ gfx::Rect bounds = view_model_.ideal_bounds(i);
+ drag_view_->SetBoundsRect(bounds);
}
+ // Fade in slowly if it landed in the shelf.
+ SetViewHidden(drag_view_,
+ false /* show */,
+ !landed_in_drag_and_drop_host /* animate */);
}
// The drag can be ended after the synchronous drag is created but before it
« no previous file with comments | « no previous file | ui/app_list/views/apps_grid_view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698