| Index: chrome/browser/ui/cocoa/autofill/autofill_main_container.mm
|
| diff --git a/chrome/browser/ui/cocoa/autofill/autofill_main_container.mm b/chrome/browser/ui/cocoa/autofill/autofill_main_container.mm
|
| index 7579555a6d0a99cc4019d777a1f7294dfa5ac3cb..80b050cc2af824efb5e45ae6cbbf224cff5412d5 100644
|
| --- a/chrome/browser/ui/cocoa/autofill/autofill_main_container.mm
|
| +++ b/chrome/browser/ui/cocoa/autofill/autofill_main_container.mm
|
| @@ -4,6 +4,9 @@
|
|
|
| #import "chrome/browser/ui/cocoa/autofill/autofill_main_container.h"
|
|
|
| +#include <algorithm>
|
| +#include <cmath>
|
| +
|
| #include "chrome/browser/ui/cocoa/autofill/autofill_dialog_constants.h"
|
| #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_button.h"
|
| #import "chrome/browser/ui/cocoa/autofill/autofill_details_container.h"
|
| @@ -49,6 +52,22 @@
|
| [[self view] addSubview:[detailsContainer_ view]];
|
| }
|
|
|
| +- (NSSize)preferredSize {
|
| + // The buttons never change size, so rely on container.
|
| + NSSize buttonSize = [buttonContainer_ frame].size;
|
| + NSSize detailsSize = [detailsContainer_ preferredSize];
|
| +
|
| + NSSize size = NSMakeSize(std::max(buttonSize.width, detailsSize.width),
|
| + buttonSize.height + detailsSize.height);
|
| +
|
| + return size;
|
| +}
|
| +
|
| +- (void)performLayout {
|
| + // Assume that the frame for the container is set already.
|
| + [detailsContainer_ performLayout];
|
| +}
|
| +
|
| - (void)buildWindowButtonsForFrame:(NSRect)frame {
|
| if (buttonContainer_.get())
|
| return;
|
|
|