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

Unified Diff: chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm

Issue 7633063: Fix a bug that was preventing rapid tab closure from working on Mac. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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/cocoa/tabs/tab_strip_controller.mm
===================================================================
--- chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm (revision 96767)
+++ chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm (working copy)
@@ -840,9 +840,16 @@
// Account for the width of the new tab button.
availableSpace -= NSWidth([newTabButton_ frame]) + kNewTabButtonOffset;
+
+ // Account for the right-side controls if not in rapid closure mode.
+ // (In rapid closure mode, the available width is set based on the
+ // position of the rightmost tab, not based on the width of the tab strip,
+ // so the right controls have already been accounted for.)
+ availableSpace -= [self rightIndentForControls];
}
+
+ // Need to leave room for the left-side controls even in rapid closure mode.
availableSpace -= [self leftIndentForControls];
- availableSpace -= [self rightIndentForControls];
}
// This may be negative, but that's okay (taken care of by |MAX()| when
« 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