Index: chrome/browser/ui/cocoa/autofill/autofill_sign_in_container.mm |
diff --git a/chrome/browser/ui/cocoa/autofill/autofill_sign_in_container.mm b/chrome/browser/ui/cocoa/autofill/autofill_sign_in_container.mm |
index 6ed7e299b23f0c3fd4988ed527e9b65a6673e15d..ea26ca9386451bb3dd2baeb468d4fecd8a953c53 100644 |
--- a/chrome/browser/ui/cocoa/autofill/autofill_sign_in_container.mm |
+++ b/chrome/browser/ui/cocoa/autofill/autofill_sign_in_container.mm |
@@ -37,17 +37,18 @@ |
- (void)loadSignInPage { |
DCHECK(webContents_.get()); |
- // Prevent accidentaly empty |maxSize_|. |
- if (NSEqualSizes(NSMakeSize(0, 0), maxSize_)) { |
- maxSize_ = [[[self view] window] frame].size; |
- maxSize_.height -= chrome_style::kClientBottomPadding; |
- } |
+ // Ensure initial minimum size doesn't cause resize. |
+ NSSize initialMinSize = [[self view] frame].size; |
+ |
+ // Ensure |maxSize_| is bigger than |initialMinSize|. |
+ maxSize_.height = std::max(maxSize_.height, initialMinSize.height); |
+ maxSize_.width = std::max(maxSize_.width, initialMinSize.width); |
signInDelegate_.reset( |
new autofill::AutofillDialogSignInDelegate( |
dialog_, webContents_.get(), |
dialog_->delegate()->GetWebContents()->GetDelegate(), |
- gfx::Size(NSSizeToCGSize(minSize_)), |
+ gfx::Size(NSSizeToCGSize(initialMinSize)), |
gfx::Size(NSSizeToCGSize(maxSize_)))); |
webContents_->GetController().LoadURL( |
dialog_->delegate()->SignInUrl(), |