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

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

Issue 219032: Mac: Sheets should be positioned between the content and everything above it. (Closed)
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/browser_window_controller.mm
diff --git a/chrome/browser/cocoa/browser_window_controller.mm b/chrome/browser/cocoa/browser_window_controller.mm
index c0e8ebcbe1775d3b362974d29f06dfa6c5ce5fd3..1c2d9d759b7979791223fab95408a25bae8b3433 100644
--- a/chrome/browser/cocoa/browser_window_controller.mm
+++ b/chrome/browser/cocoa/browser_window_controller.mm
@@ -1155,8 +1155,11 @@ willPositionSheet:(NSWindow*)sheet
- (NSRect)window:(NSWindow*)window
willPositionSheet:(NSWindow*)sheet
usingRect:(NSRect)defaultSheetRect {
- NSRect windowFrame = [window frame];
- defaultSheetRect.origin.y = windowFrame.size.height - 10;
+ // Any sheet should come from right above the visible content area.
+ NSRect toolbarFrame = [[toolbarController_ view] frame];
+ NSRect infobarFrame = [[infoBarContainerController_ view] frame];
+ defaultSheetRect.origin.y = toolbarFrame.origin.y - infobarFrame.size.height;
+
return defaultSheetRect;
}
« 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