summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-31 00:33:17 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-31 00:33:17 +0000
commitfb13ce65f5df2df87294b3857d6c301b51b222e5 (patch)
tree5ff8e64e7cee99b14682722a466d24be618b2a22 /chrome
parentd19921bf3f89589fafea8321d5119463bd9f173b (diff)
downloadchromium_src-fb13ce65f5df2df87294b3857d6c301b51b222e5.zip
chromium_src-fb13ce65f5df2df87294b3857d6c301b51b222e5.tar.gz
chromium_src-fb13ce65f5df2df87294b3857d6c301b51b222e5.tar.bz2
Roll back these tab changes since there are still issues.
TBR=idanan Review URL: http://codereview.chromium.org/19735 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9000 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/views/tabs/tab_strip.cc24
1 files changed, 2 insertions, 22 deletions
diff --git a/chrome/browser/views/tabs/tab_strip.cc b/chrome/browser/views/tabs/tab_strip.cc
index 4bfcf2f..243bfa9 100644
--- a/chrome/browser/views/tabs/tab_strip.cc
+++ b/chrome/browser/views/tabs/tab_strip.cc
@@ -672,10 +672,6 @@ void TabStrip::Layout() {
// - animation completion
if (active_animation_.get())
active_animation_->Stop();
-
- // Reset the reserved tab width on resize in case a layout was left pending.
- available_width_for_tabs_ = -1;
-
GenerateIdealBounds();
int tab_count = GetTabCount();
int tab_right = 0;
@@ -1474,24 +1470,8 @@ void TabStrip::StartResizeLayoutAnimation() {
}
void TabStrip::StartInsertTabAnimation(int index) {
- // Don't shock users by letting all tabs move when they are focused
- // on the tab-strip. Wait for later, when they aren't looking.
-
- // To compute the required size of the tab-strip we need to get
- // the last already inserted tab, so if we are inserting the last
- // one, back off by one.
- int last_tab_index = GetTabCount() - 1;
- if (last_tab_index == index)
- --last_tab_index;
-
- if (last_tab_index > 0) {
- Tab* last_tab = GetTabAt(last_tab_index);
- available_width_for_tabs_ = std::min(
- GetAvailableWidthForTabs(last_tab) + last_tab->width(),
- width() - (kNewTabButtonHOffset + newtab_button_size_.width()));
- } else {
- available_width_for_tabs_ = -1;
- }
+ // The TabStrip can now use its entire width to lay out Tabs.
+ available_width_for_tabs_ = -1;
if (active_animation_.get())
active_animation_->Stop();
active_animation_.reset(new InsertTabAnimation(this, index));