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

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

Issue 82933002: [rAc OSX] Simplify the overlay controller. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update unit tests Created 7 years, 1 month 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 | « no previous file | chrome/browser/ui/cocoa/autofill/autofill_overlay_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/autofill/autofill_dialog_window_controller.mm
diff --git a/chrome/browser/ui/cocoa/autofill/autofill_dialog_window_controller.mm b/chrome/browser/ui/cocoa/autofill/autofill_dialog_window_controller.mm
index c7ab45689916b9c13dcc4bc6452f4e911bf24b3f..2346a455adf6e87fbc4d4b1bea847a1cdb06c619 100644
--- a/chrome/browser/ui/cocoa/autofill/autofill_dialog_window_controller.mm
+++ b/chrome/browser/ui/cocoa/autofill/autofill_dialog_window_controller.mm
@@ -205,19 +205,17 @@ const CGFloat kDecorationHeight = kAccountChooserHeight +
- (NSSize)preferredSize {
NSSize size;
- // Overall size is determined by either main container or sign in view.
- if ([[signInContainer_ view] isHidden])
- size = [mainContainer_ preferredSize];
- else
- size = [signInContainer_ preferredSize];
-
- // Always make room for the header.
- size.height += kDecorationHeight;
-
if (![[overlayController_ view] isHidden]) {
- CGFloat height = [overlayController_ heightForWidth:size.width];
- if (height != 0.0)
- size.height = height;
+ size.height = [overlayController_ heightForWidth:size.width];
+ } else {
+ // Overall size is determined by either main container or sign in view.
+ if ([[signInContainer_ view] isHidden])
+ size = [mainContainer_ preferredSize];
+ else
+ size = [signInContainer_ preferredSize];
+
+ // Always make room for the header.
+ size.height += kDecorationHeight;
}
// Show as much of the main view as is possible without going past the
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/autofill/autofill_overlay_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698