Chromium Code Reviews| Index: chrome/browser/ui/cocoa/tab_strip_controller.mm |
| diff --git a/chrome/browser/ui/cocoa/tab_strip_controller.mm b/chrome/browser/ui/cocoa/tab_strip_controller.mm |
| index 876067c640b766e3f34a0755931a56b6f320ca33..fa532e7f6f486014c9da61e3ffd7a1bc0b89f9a5 100644 |
| --- a/chrome/browser/ui/cocoa/tab_strip_controller.mm |
| +++ b/chrome/browser/ui/cocoa/tab_strip_controller.mm |
| @@ -791,7 +791,6 @@ private: |
| BOOL visible = [[tabStripView_ window] isVisible]; |
| CGFloat offset = [self indentForControls]; |
| - NSUInteger i = 0; |
| bool hasPlaceholderGap = false; |
| for (TabController* tab in tabArray_.get()) { |
| // Ignore a tab that is going through a close animation. |
| @@ -811,9 +810,8 @@ private: |
| // If the tab is hidden, we consider it a new tab. We make it visible |
| // and animate it in. |
| BOOL newTab = [[tab view] isHidden]; |
| - if (newTab) { |
| + if (newTab) |
| [[tab view] setHidden:NO]; |
| - } |
| if (isPlaceholder) { |
| // Move the current tab to the correct location instantly. |
| @@ -896,7 +894,6 @@ private: |
| offset += NSWidth(tabFrame); |
| offset -= kTabOverlap; |
| } |
| - i++; |
| } |
| // Hide the new tab button if we're explicitly told to. It may already |
| @@ -909,10 +906,9 @@ private: |
| // We've already ensured there's enough space for the new tab button |
| // so we don't have to check it against the available space. We do need |
| // to make sure we put it after any placeholder. |
| - newTabNewFrame.origin = NSMakePoint(offset, 0); |
| - newTabNewFrame.origin.x = MAX(newTabNewFrame.origin.x, |
| - NSMaxX(placeholderFrame_)) + |
| - kNewTabButtonOffset; |
| + newTabNewFrame.origin = |
| + NSMakePoint(MAX(offset, NSMaxX(placeholderFrame_) - kTabOverlap) + |
|
Nico
2010/12/30 03:56:06
As you would say, "I hate this formatting". Maybe
viettrungluu
2010/12/30 05:07:21
Done. I hated the formatting too. Ironically, intr
|
| + kNewTabButtonOffset, 0); |
| if ([tabContentsArray_ count]) |
| [newTabButton_ setHidden:NO]; |