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

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

Issue 196002: Temporarily back out r25049 to isolate it as the cause of bug 20872 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 3 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/cocoa/tab_strip_controller.mm
===================================================================
--- chrome/browser/cocoa/tab_strip_controller.mm (revision 25245)
+++ chrome/browser/cocoa/tab_strip_controller.mm (working copy)
@@ -419,10 +419,8 @@
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 @@
}
// 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 @@
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];
« 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