| Index: chrome/browser/gtk/tabs/tab_strip_gtk.cc
|
| ===================================================================
|
| --- chrome/browser/gtk/tabs/tab_strip_gtk.cc (revision 31449)
|
| +++ chrome/browser/gtk/tabs/tab_strip_gtk.cc (working copy)
|
| @@ -964,14 +964,12 @@
|
| }
|
|
|
| void TabStripGtk::TabDetachedAt(TabContents* contents, int index) {
|
| - if (CanUpdateDisplay()) {
|
| - GenerateIdealBounds();
|
| - StartRemoveTabAnimation(index, contents);
|
| - // Have to do this _after_ calling StartRemoveTabAnimation, so that any
|
| - // previous remove is completed fully and index is valid in sync with the
|
| - // model index.
|
| - GetTabAt(index)->set_closing(true);
|
| - }
|
| + GenerateIdealBounds();
|
| + StartRemoveTabAnimation(index, contents);
|
| + // Have to do this _after_ calling StartRemoveTabAnimation, so that any
|
| + // previous remove is completed fully and index is valid in sync with the
|
| + // model index.
|
| + GetTabAt(index)->set_closing(true);
|
| }
|
|
|
| void TabStripGtk::TabSelectedAt(TabContents* old_contents,
|
| @@ -980,20 +978,18 @@
|
| bool user_gesture) {
|
| DCHECK(index >= 0 && index < static_cast<int>(GetTabCount()));
|
|
|
| - if (CanUpdateDisplay()) {
|
| - // We have "tiny tabs" if the tabs are so tiny that the unselected ones are
|
| - // a different size to the selected ones.
|
| - bool tiny_tabs = current_unselected_width_ != current_selected_width_;
|
| - if (!IsAnimating() && (!resize_layout_scheduled_ || tiny_tabs))
|
| - Layout();
|
| + // We have "tiny tabs" if the tabs are so tiny that the unselected ones are
|
| + // a different size to the selected ones.
|
| + bool tiny_tabs = current_unselected_width_ != current_selected_width_;
|
| + if (!IsAnimating() && (!resize_layout_scheduled_ || tiny_tabs))
|
| + Layout();
|
|
|
| - GetTabAt(index)->SchedulePaint();
|
| + GetTabAt(index)->SchedulePaint();
|
|
|
| - int old_index = model_->GetIndexOfTabContents(old_contents);
|
| - if (old_index >= 0) {
|
| - GetTabAt(old_index)->SchedulePaint();
|
| - GetTabAt(old_index)->StopPinnedTabTitleAnimation();
|
| - }
|
| + int old_index = model_->GetIndexOfTabContents(old_contents);
|
| + if (old_index >= 0) {
|
| + GetTabAt(old_index)->SchedulePaint();
|
| + GetTabAt(old_index)->StopPinnedTabTitleAnimation();
|
| }
|
| }
|
|
|
| @@ -1778,17 +1774,6 @@
|
| active_animation_->Start();
|
| }
|
|
|
| -bool TabStripGtk::CanUpdateDisplay() {
|
| - // Don't bother laying out/painting when we're closing all tabs.
|
| - if (model_->closing_all()) {
|
| - // Make sure any active animation is ended, too.
|
| - if (active_animation_.get())
|
| - active_animation_->Stop();
|
| - return false;
|
| - }
|
| - return true;
|
| -}
|
| -
|
| void TabStripGtk::FinishAnimation(TabStripGtk::TabAnimation* animation,
|
| bool layout) {
|
| active_animation_.reset(NULL);
|
|
|