summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/browser.cc4
-rw-r--r--chrome/browser/views/frame/browser_view2.cc4
-rw-r--r--chrome/browser/views/tabs/dragged_tab_controller.cc5
3 files changed, 13 insertions, 0 deletions
diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc
index e1fab37..af660d4 100644
--- a/chrome/browser/browser.cc
+++ b/chrome/browser/browser.cc
@@ -944,6 +944,10 @@ StatusBubble* Browser::GetStatusBubble() {
// of any WS_POPUP HWNDs.
void Browser::WindowMoved() {
DCHECK(!g_browser_process->IsUsingNewFrames());
+ // Cancel any tabstrip animations, some of them may be invalidated by the
+ // window being repositioned.
+ window_->GetTabStrip()->DestroyDragController();
+
GetStatusBubble()->Reposition();
// Close the omnibox popup, if any.
diff --git a/chrome/browser/views/frame/browser_view2.cc b/chrome/browser/views/frame/browser_view2.cc
index cadf038..dcc9769 100644
--- a/chrome/browser/views/frame/browser_view2.cc
+++ b/chrome/browser/views/frame/browser_view2.cc
@@ -114,6 +114,10 @@ BrowserView2::~BrowserView2() {
}
void BrowserView2::WindowMoved() {
+ // Cancel any tabstrip animations, some of them may be invalidated by the
+ // window being repositioned.
+ tabstrip_->DestroyDragController();
+
status_bubble_->Reposition();
// Close the omnibox popup, if any.
diff --git a/chrome/browser/views/tabs/dragged_tab_controller.cc b/chrome/browser/views/tabs/dragged_tab_controller.cc
index cf768a7..455c703 100644
--- a/chrome/browser/views/tabs/dragged_tab_controller.cc
+++ b/chrome/browser/views/tabs/dragged_tab_controller.cc
@@ -103,6 +103,11 @@ DraggedTabController::~DraggedTabController() {
in_destructor_ = true;
CleanUpSourceTab();
MessageLoopForUI::current()->RemoveObserver(this);
+ // Need to delete the view here manually _before_ we reset the dragged
+ // contents to NULL, otherwise if the view is animating to its destination
+ // bounds, it won't be able to clean up properly since its cleanup routine
+ // uses GetIndexForDraggedContents, which will be invalid.
+ view_.reset(NULL);
ChangeDraggedContents(NULL); // This removes our observer.
}