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

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

Issue 7307028: Changed StartMouseInitiatedRemoveTabAnimation to use tab data indices rather than Model indices w... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 5 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 | « no previous file | 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
===================================================================
--- chrome/browser/ui/views/tabs/tab_strip.cc (revision 91577)
+++ chrome/browser/ui/views/tabs/tab_strip.cc (working copy)
@@ -968,8 +968,11 @@
DCHECK(tab_data_index != tab_count());
BaseTab* tab_closing = base_tab_at_tab_index(tab_data_index);
int delta = tab_closing->width() + kTabHOffset;
- if (tab_closing->data().mini && model_index + 1 < GetModelCount() &&
- !GetBaseTabAtModelIndex(model_index + 1)->data().mini) {
+ // If the tab being closed is a mini-tab next to a non-mini-tab, be sure to
+ // add the extra padding.
+ int next_tab_data_index = ModelIndexToTabIndex(model_index + 1);
+ if (tab_closing->data().mini && next_tab_data_index < tab_count() &&
sky 2011/07/06 20:54:56 Insert: DCHECK_NE(next_tab_index, tab_count()) bet
+ !base_tab_at_tab_index(next_tab_data_index)->data().mini) {
delta += mini_to_non_mini_gap_;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698