diff options
author | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-03 03:31:06 +0000 |
---|---|---|
committer | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-03 03:31:06 +0000 |
commit | 1545917e8c1170a109aeb5f4616b2f2e73e729ce (patch) | |
tree | 5d6490ac131f89b6b8940c93d8ef4b7209508803 /chrome/browser | |
parent | 0be9a8a8c2a92ef44712e540d063877919abfa93 (diff) | |
download | chromium_src-1545917e8c1170a109aeb5f4616b2f2e73e729ce.zip chromium_src-1545917e8c1170a109aeb5f4616b2f2e73e729ce.tar.gz chromium_src-1545917e8c1170a109aeb5f4616b2f2e73e729ce.tar.bz2 |
Temporarily back out r25049 to isolate it as the cause of bug 20872.
TBR=pinkerton
BUG=20872
TEST=watch perf
Review URL: http://codereview.chromium.org/196002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25295 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/cocoa/tab_strip_controller.mm | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/chrome/browser/cocoa/tab_strip_controller.mm b/chrome/browser/cocoa/tab_strip_controller.mm index 2035cdc..69eae6d 100644 --- a/chrome/browser/cocoa/tab_strip_controller.mm +++ b/chrome/browser/cocoa/tab_strip_controller.mm @@ -419,10 +419,8 @@ static const float kUseFullAvailableWidth = -1.0; tabFrame.origin.x = offset; } - // 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) { + // Animate the tab in by putting it below the horizon. + if (newTab && visible && animate) { [[tab view] setFrame:NSOffsetRect(tabFrame, 0, -NSHeight(tabFrame))]; } @@ -451,8 +449,7 @@ static const float kUseFullAvailableWidth = -1.0; } // Hide the new tab button if we're explicitly told to. It may already - // be hidden, doing it again doesn't hurt. Otherwise position it - // appropriately, showing it if necessary. + // be hidden, doing it again doesn't hurt. if (forceNewTabButtonHidden_) { [newTabButton_ setHidden:YES]; } else { @@ -464,8 +461,10 @@ static const float kUseFullAvailableWidth = -1.0; newTabNewFrame.origin.x = MAX(newTabNewFrame.origin.x, NSMaxX(placeholderFrame_)) + kNewTabButtonOffset; - if ([tabContentsArray_ count]) - [newTabButton_ setHidden:NO]; + if (i > 0 && [newTabButton_ isHidden]) { + id target = animate ? [newTabButton_ animator] : newTabButton_; + [target setHidden:NO]; + } if (!NSEqualRects(newTabTargetFrame_, newTabNewFrame)) { [newTabButton_ setFrame:newTabNewFrame]; |