| Index: chrome/browser/ui/views/autofill/password_generation_popup_view_views.cc
|
| diff --git a/chrome/browser/ui/views/autofill/password_generation_popup_view_views.cc b/chrome/browser/ui/views/autofill/password_generation_popup_view_views.cc
|
| index 052cdce19032b264b35a784d9dbc99a4bd7ee380..addc3e0e9a2734b44e38d2967e0aa64b8189c6ab 100644
|
| --- a/chrome/browser/ui/views/autofill/password_generation_popup_view_views.cc
|
| +++ b/chrome/browser/ui/views/autofill/password_generation_popup_view_views.cc
|
| @@ -177,16 +177,17 @@ void PasswordGenerationPopupViewViews::CreatePasswordView() {
|
| }
|
|
|
| gfx::Size PasswordGenerationPopupViewViews::GetPreferredSizeOfPasswordView() {
|
| - int height = kPopupBorderThickness;
|
| + int width = controller_->GetMinimumWidth();
|
| + if (password_view_)
|
| + width = std::max(width, password_view_->GetMinimumSize().width());
|
| + int height = help_label_->GetHeightForWidth(width);
|
| if (controller_->display_password()) {
|
| // Add divider height as well.
|
| height +=
|
| PasswordGenerationPopupController::kPopupPasswordSectionHeight + 1;
|
| }
|
| - int width = controller_->GetMinimumWidth();
|
| - int popup_width = width - 2 * kPopupBorderThickness;
|
| - height += help_label_->GetHeightForWidth(popup_width);
|
| - return gfx::Size(width, height + kPopupBorderThickness);
|
| + return gfx::Size(width + 2 * kPopupBorderThickness,
|
| + height + 2 * kPopupBorderThickness);
|
| }
|
|
|
| void PasswordGenerationPopupViewViews::Show() {
|
|
|