| Index: chrome/browser/cocoa/tab_strip_controller.mm
|
| ===================================================================
|
| --- chrome/browser/cocoa/tab_strip_controller.mm (revision 25295)
|
| +++ chrome/browser/cocoa/tab_strip_controller.mm (working copy)
|
| @@ -419,8 +419,10 @@
|
| tabFrame.origin.x = offset;
|
| }
|
|
|
| - // Animate the tab in by putting it below the horizon.
|
| - if (newTab && visible && animate) {
|
| + // Animate the tab in by putting it below the horizon, but don't bother
|
| + // if we only have 1 tab.
|
| + BOOL shouldAnimate = animate && [tabContentsArray_ count] > 1;
|
| + if (newTab && visible && shouldAnimate) {
|
| [[tab view] setFrame:NSOffsetRect(tabFrame, 0, -NSHeight(tabFrame))];
|
| }
|
|
|
| @@ -449,7 +451,8 @@
|
| }
|
|
|
| // Hide the new tab button if we're explicitly told to. It may already
|
| - // be hidden, doing it again doesn't hurt.
|
| + // be hidden, doing it again doesn't hurt. Otherwise position it
|
| + // appropriately, showing it if necessary.
|
| if (forceNewTabButtonHidden_) {
|
| [newTabButton_ setHidden:YES];
|
| } else {
|
| @@ -461,10 +464,8 @@
|
| newTabNewFrame.origin.x = MAX(newTabNewFrame.origin.x,
|
| NSMaxX(placeholderFrame_)) +
|
| kNewTabButtonOffset;
|
| - if (i > 0 && [newTabButton_ isHidden]) {
|
| - id target = animate ? [newTabButton_ animator] : newTabButton_;
|
| - [target setHidden:NO];
|
| - }
|
| + if ([tabContentsArray_ count])
|
| + [newTabButton_ setHidden:NO];
|
|
|
| if (!NSEqualRects(newTabTargetFrame_, newTabNewFrame)) {
|
| [newTabButton_ setFrame:newTabNewFrame];
|
|
|