Chromium Code Reviews| Index: chrome/browser/ui/cocoa/status_bubble_mac.mm |
| =================================================================== |
| --- chrome/browser/ui/cocoa/status_bubble_mac.mm (revision 133437) |
| +++ chrome/browser/ui/cocoa/status_bubble_mac.mm (working copy) |
| @@ -118,7 +118,8 @@ |
| Hide(); |
| [[[window_ animationForKey:kFadeAnimationKey] delegate] invalidate]; |
| - Detach(); |
| + if (is_attached()) |
|
Mark Mentovai
2012/04/23 17:59:36
Why not move this logic into Detach()?
Detach() i
asvitkine_google
2012/04/23 18:06:24
Done.
|
| + Detach(); |
| [window_ release]; |
| window_ = nil; |
| } |
| @@ -447,8 +448,12 @@ |
| if (state == state_) |
| return; |
| - if (state == kBubbleHidden) |
| - [window_ setFrame:NSMakeRect(0, 0, 1, 1) display:YES]; |
| + if (state == kBubbleHidden) { |
|
sail
2012/04/23 18:08:53
Hi Alexei. I think this change might reintroduce b
sail
2012/04/23 18:10:22
Also, you may decide that regressing the above bug
|
| + if (is_attached()) |
| + Detach(); |
| + } else if (!is_attached()) { |
| + Attach(); |
| + } |
| if ([delegate_ respondsToSelector:@selector(statusBubbleWillEnterState:)]) |
| [delegate_ statusBubbleWillEnterState:state]; |
| @@ -680,7 +685,8 @@ |
| DCHECK(parent); |
| DCHECK(is_attached()); |
| - Detach(); |
| + if (is_attached()) |
| + Detach(); |
| parent_ = parent; |
| Attach(); |
| UpdateSizeAndPosition(); |