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

Unified Diff: chrome/browser/ui/views/autofill/password_generation_popup_view_views.cc

Issue 2790953002: Fix calculation of Password Generation popup. (Closed)
Patch Set: Created 3 years, 9 months 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..09779e952fd00e72d541317c9dced6b1c3e613d9 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
@@ -184,9 +184,11 @@ gfx::Size PasswordGenerationPopupViewViews::GetPreferredSizeOfPasswordView() {
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);
+ if (password_view_)
+ width = std::max(width, password_view_->GetMinimumSize().width());
+ height += help_label_->GetHeightForWidth(width);
+ return gfx::Size(width + 2 * kPopupBorderThickness,
+ height + kPopupBorderThickness);
}
void PasswordGenerationPopupViewViews::Show() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698