summaryrefslogtreecommitdiffstats
path: root/chrome/browser/tabs
diff options
context:
space:
mode:
authorbeng@google.com <beng@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-09 21:23:21 +0000
committerbeng@google.com <beng@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-09 21:23:21 +0000
commitd8fed64f1099df4229243f8f811aaf1c8a0144c3 (patch)
tree6263e82da4d8029e76778723e2fcd4b13d70c24e /chrome/browser/tabs
parent243f86a720537c56e0b148e4277cfe319310cbd3 (diff)
downloadchromium_src-d8fed64f1099df4229243f8f811aaf1c8a0144c3.zip
chromium_src-d8fed64f1099df4229243f8f811aaf1c8a0144c3.tar.gz
chromium_src-d8fed64f1099df4229243f8f811aaf1c8a0144c3.tar.bz2
Make sure the TabStrip is laid out after a drag-detach operation is completed. This is important because if there was a pending animation it was canceled, potentially leaving the TabStrip in a bad visual state.
Also remove some debugging code that wasn't useful. B=1317895 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@633 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tabs')
-rw-r--r--chrome/browser/tabs/dragged_tab_controller.cc4
-rw-r--r--chrome/browser/tabs/tab_strip.cc4
2 files changed, 4 insertions, 4 deletions
diff --git a/chrome/browser/tabs/dragged_tab_controller.cc b/chrome/browser/tabs/dragged_tab_controller.cc
index 0e7ac34..c522276 100644
--- a/chrome/browser/tabs/dragged_tab_controller.cc
+++ b/chrome/browser/tabs/dragged_tab_controller.cc
@@ -727,10 +727,6 @@ bool DraggedTabController::CompleteDrag() {
destroy_immediately = false;
} else {
// Compel the model to construct a new window for the detached TabContents.
- // TODO(beng): this is here for one cycle only to see if it's
- // dragged_contents_ that's getting freed, or something else.
- dragged_contents_->GetContentHWND();
- dragged_contents_->GetTitle().size();
source_tabstrip_->model()->TearOffTabContents(
dragged_contents_,
GetWindowCreatePoint());
diff --git a/chrome/browser/tabs/tab_strip.cc b/chrome/browser/tabs/tab_strip.cc
index 04b33b3..2354f5e 100644
--- a/chrome/browser/tabs/tab_strip.cc
+++ b/chrome/browser/tabs/tab_strip.cc
@@ -546,6 +546,10 @@ void TabStrip::DestroyDraggedSourceTab(Tab* tab) {
}
tab->GetParent()->RemoveChildView(tab);
delete tab;
+ // Force a layout here, because if we've just quickly drag detached a Tab,
+ // the stopping of the active animation above may have left the TabStrip in a
+ // bad (visual) state.
+ Layout();
}
gfx::Rect TabStrip::GetIdealBounds(int index) {