Commit 98b4516c authored by rohitrao@chromium.org's avatar rohitrao@chromium.org

Fix a bug that was preventing rapid tab closure from working on Mac.

Fixes a tab strip layout bug where closing tabs would not properly position the
close button under the mouse cursor.

BUG=92623
TEST=Open incognito window and create many tabs.  Try to close the rightmost tab.  The tabs should reposition so that the close button is under the mouse.

Review URL: http://codereview.chromium.org/7633063

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96928 0039d316-1c4b-4281-b951-d872f2087c98
parent 1b4b3566
...@@ -840,9 +840,16 @@ private: ...@@ -840,9 +840,16 @@ private:
// Account for the width of the new tab button. // Account for the width of the new tab button.
availableSpace -= NSWidth([newTabButton_ frame]) + kNewTabButtonOffset; 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 leftIndentForControls];
availableSpace -= [self rightIndentForControls];
} }
// This may be negative, but that's okay (taken care of by |MAX()| when // This may be negative, but that's okay (taken care of by |MAX()| when
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment