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

Unified Diff: chrome/browser/ui/cocoa/status_bubble_mac.mm

Issue 7129048: Zero-sized windows are bad. Don't. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 6 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/ui/cocoa/status_bubble_mac.mm
diff --git a/chrome/browser/ui/cocoa/status_bubble_mac.mm b/chrome/browser/ui/cocoa/status_bubble_mac.mm
index 3e2a6e01fe3b13a88fb0251994a1fc2df80a9470..a95f2252e8947e0740331220faa3f2302ac92479 100644
--- a/chrome/browser/ui/cocoa/status_bubble_mac.mm
+++ b/chrome/browser/ui/cocoa/status_bubble_mac.mm
@@ -352,7 +352,7 @@ void StatusBubbleMac::UpdateDownloadShelfVisibility(bool visible) {
void StatusBubbleMac::Create() {
DCHECK(!window_);
- window_ = [[NSWindow alloc] initWithContentRect:NSZeroRect
+ window_ = [[NSWindow alloc] initWithContentRect:NSMakeRect(0, 0, 1, 1)
styleMask:NSBorderlessWindowMask
backing:NSBackingStoreBuffered
defer:YES];
@@ -367,7 +367,8 @@ void StatusBubbleMac::Create() {
// bubble and that the StatusBubble is torn down completely prior to the
// window going away.
scoped_nsobject<BubbleView> view(
- [[BubbleView alloc] initWithFrame:NSZeroRect themeProvider:parent_]);
+ [[BubbleView alloc] initWithFrame:NSMakeRect(0, 0, 1, 1)
sail 2011/06/10 01:04:24 Are you sure we need this? I create zero rect view
Avi (use Gerrit) 2011/06/10 01:20:27 Zero-rect views are fine. I wanted to change this
+ themeProvider:parent_]);
[window_ setContentView:view];
[window_ setAlphaValue:0.0];
@@ -436,7 +437,7 @@ void StatusBubbleMac::SetState(StatusBubbleState state) {
return;
if (state == kBubbleHidden)
- [window_ setFrame:NSZeroRect display:YES];
+ [window_ setFrame:NSMakeRect(0, 0, 1, 1) display:YES];
sail 2011/06/10 01:04:24 will this be visible?
Avi (use Gerrit) 2011/06/10 01:20:27 No, I checked. The bubble's faded to zero opacity
if ([delegate_ respondsToSelector:@selector(statusBubbleWillEnterState:)])
[delegate_ statusBubbleWillEnterState:state];
« 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