| Index: chrome/browser/ui/cocoa/extensions/shell_window_cocoa.mm
|
| diff --git a/chrome/browser/ui/cocoa/extensions/shell_window_cocoa.mm b/chrome/browser/ui/cocoa/extensions/shell_window_cocoa.mm
|
| index c07553f33faa257400803aefc88f6a61c39f9de5..9aa5653ac58d566ab7d26c035cdd5272f9f50949 100644
|
| --- a/chrome/browser/ui/cocoa/extensions/shell_window_cocoa.mm
|
| +++ b/chrome/browser/ui/cocoa/extensions/shell_window_cocoa.mm
|
| @@ -72,8 +72,8 @@ gfx::Rect ShellWindowCocoa::GetRestoredBounds() const {
|
| // Flip coordinates based on the primary screen.
|
| NSScreen* screen = [[NSScreen screens] objectAtIndex:0];
|
| NSRect frame = [window() frame];
|
| - gfx::Rect bounds(frame.origin.x, 0, frame.size.width, frame.size.height);
|
| - bounds.set_y([screen frame].size.height - frame.origin.y - frame.size.height);
|
| + gfx::Rect bounds(frame.origin.x, 0, NSWidth(frame), NSHeight(frame));
|
| + bounds.set_y(NSHeight([screen frame]) - NSMaxY(frame));
|
| return bounds;
|
| }
|
|
|
| @@ -135,8 +135,7 @@ void ShellWindowCocoa::SetBounds(const gfx::Rect& bounds) {
|
| checked_bounds.height());
|
| // Flip coordinates based on the primary screen.
|
| NSScreen* screen = [[NSScreen screens] objectAtIndex:0];
|
| - cocoa_bounds.origin.y =
|
| - [screen frame].size.height - checked_bounds.height() - checked_bounds.y();
|
| + cocoa_bounds.origin.y = NSHeight([screen frame]) - checked_bounds.bottom();
|
|
|
| [window() setFrame:cocoa_bounds display:YES];
|
| }
|
|
|