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

Unified Diff: chrome/browser/ui/views/tabs/tab_strip.cc

Issue 11821036: Fixes couple of bugs in the TabStrip that could cause tabs to dance (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 months 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/ui/views/tabs/tab_drag_controller.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/tabs/tab_strip.cc
diff --git a/chrome/browser/ui/views/tabs/tab_strip.cc b/chrome/browser/ui/views/tabs/tab_strip.cc
index 8a384b6c515d35bb30dc936b82ce154e1d6980fe..892b64b9f6e430379ede3ad43a57230c5c9b4a16 100644
--- a/chrome/browser/ui/views/tabs/tab_strip.cc
+++ b/chrome/browser/ui/views/tabs/tab_strip.cc
@@ -1089,7 +1089,7 @@ void TabStrip::MaybeStartDrag(
GetWidget()->SetCapture(this);
drag_controller_.reset(new TabDragController);
drag_controller_->Init(
- this, tab, tabs, gfx::Point(x, y), tab->GetMirroredXInView(event.x()),
+ this, tab, tabs, gfx::Point(x, y), event.x(),
selection_model, detach_behavior, move_behavior);
}
@@ -2124,16 +2124,11 @@ void TabStrip::ResizeLayoutTabs() {
// mini-tabs have the same width), so there is nothing to do.
return;
}
- Tab* first_tab = tab_at(mini_tab_count);
- double unselected, selected;
- GetDesiredTabWidths(tab_count(), mini_tab_count, &unselected, &selected);
- // TODO: this is always selected, should it be 'selected : unselected'?
- int w = Round(first_tab->IsActive() ? selected : selected);
-
- // We only want to run the animation if we're not already at the desired
- // size.
- if (abs(first_tab->width() - w) > 1)
- StartResizeLayoutAnimation();
+ // Don't try and avoid layout based on tab sizes. If tabs are small enough
+ // then the width of the active tab may not change, but other widths may
+ // have. This is particularly important if we've overflowed (all tabs are at
+ // the min).
+ StartResizeLayoutAnimation();
}
void TabStrip::ResizeLayoutTabsFromTouch() {
« no previous file with comments | « chrome/browser/ui/views/tabs/tab_drag_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698