| Index: chrome/browser/ui/cocoa/constrained_web_dialog_delegate_mac.mm
|
| diff --git a/chrome/browser/ui/cocoa/constrained_web_dialog_delegate_mac.mm b/chrome/browser/ui/cocoa/constrained_web_dialog_delegate_mac.mm
|
| index e742f0e366d45fb61a51e6f25184914b01f844f9..9ef87e6b73aa7350a02eaa7dd2a93749a4a357a0 100644
|
| --- a/chrome/browser/ui/cocoa/constrained_web_dialog_delegate_mac.mm
|
| +++ b/chrome/browser/ui/cocoa/constrained_web_dialog_delegate_mac.mm
|
| @@ -149,11 +149,7 @@ class ConstrainedWebDialogDelegateViewMac :
|
| EnableAutoResize();
|
| }
|
| void DocumentOnLoadCompletedInMainFrame() override {
|
| - if (!IsDialogAutoResizable())
|
| - return;
|
| -
|
| - EnableAutoResize();
|
| - if (GetWebContents())
|
| + if (IsDialogAutoResizable() && GetWebContents())
|
| constrained_window_->ShowWebContentsModalDialog();
|
| }
|
|
|
| @@ -202,8 +198,10 @@ ConstrainedWebDialogDelegateViewMac::ConstrainedWebDialogDelegateViewMac(
|
| this)),
|
| min_size_(min_size),
|
| max_size_(max_size) {
|
| - if (IsDialogAutoResizable())
|
| + if (IsDialogAutoResizable()) {
|
| Observe(GetWebContents());
|
| + EnableAutoResize();
|
| + }
|
|
|
| // Create a window to hold web_contents in the constrained sheet:
|
| gfx::Size size;
|
|
|