| Index: ui/views/cocoa/views_nswindow_delegate.mm
|
| diff --git a/ui/views/cocoa/views_nswindow_delegate.mm b/ui/views/cocoa/views_nswindow_delegate.mm
|
| index d8f1a8230ab989930baca03a532e22e620ec40be..67579ad868cfb4815bcea5d139b2f2ee5a4bb851 100644
|
| --- a/ui/views/cocoa/views_nswindow_delegate.mm
|
| +++ b/ui/views/cocoa/views_nswindow_delegate.mm
|
| @@ -130,4 +130,17 @@
|
| return proposedSize;
|
| }
|
|
|
| +// Override to correctly position modal dialogs.
|
| +- (NSRect)window:(NSWindow*)window
|
| + willPositionSheet:(NSWindow*)sheet
|
| + usingRect:(NSRect)defaultSheetLocation {
|
| + // As per NSWindowDelegate documentation, the origin indicates the top left
|
| + // point of the host frame in window coordinates. The width changes the
|
| + // animation from vertical to trapezoid if it is smaller than the width of the
|
| + // dialog. The height is ignored but should be set to zero.
|
| + return NSMakeRect(
|
| + 0, NSHeight([window frame]) - [self nativeWidgetMac]->SheetPositionY(),
|
| + NSWidth(defaultSheetLocation), 0);
|
| +}
|
| +
|
| @end
|
|
|