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

Unified Diff: chrome/browser/ui/cocoa/autofill/autofill_sign_in_container.mm

Issue 97993006: [rAC, OSX] Force better initial size for sign-in (2nd try) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 | « chrome/browser/ui/cocoa/autofill/autofill_dialog_window_controller.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(),
« no previous file with comments | « chrome/browser/ui/cocoa/autofill/autofill_dialog_window_controller.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698