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

Unified Diff: chrome/browser/gtk/tabs/tab_strip_gtk.cc

Issue 372068: Removes TabStrip::CanUpdateDisplay as it lead to crashes on the... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 1 month 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 | « chrome/browser/gtk/tabs/tab_strip_gtk.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « chrome/browser/gtk/tabs/tab_strip_gtk.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698