Index: components/constrained_window/constrained_window_views.cc |
diff --git a/components/constrained_window/constrained_window_views.cc b/components/constrained_window/constrained_window_views.cc |
index d00551385504274b22bd5666e1d1d8496dd99168..5ae6cd7776da6ae7eb24433ddda5d07c808fa9bd 100644 |
--- a/components/constrained_window/constrained_window_views.cc |
+++ b/components/constrained_window/constrained_window_views.cc |
@@ -166,8 +166,18 @@ views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog, |
: nullptr; |
views::Widget* widget = |
views::DialogDelegate::CreateDialogWidget(dialog, NULL, parent_view); |
- if (!dialog->UseNewStyleForThisDialog()) |
+ |
+ bool requires_positioning = dialog->UseNewStyleForThisDialog(); |
+ |
+#if defined(OS_MACOSX) |
+ // On Mac, window modal dialogs are displayed as sheets, so their position is |
+ // managed by the parent window. |
+ requires_positioning = false; |
+#endif |
+ |
+ if (!requires_positioning) |
return widget; |
+ |
ModalDialogHost* host = constrained_window_views_client-> |
GetModalDialogHost(parent); |
if (host) { |