Index: chrome/browser/ui/autofill/autofill_popup_controller_impl.cc |
diff --git a/chrome/browser/ui/autofill/autofill_popup_controller_impl.cc b/chrome/browser/ui/autofill/autofill_popup_controller_impl.cc |
index e310f8a1eb546f238146986b5f0bb387e4fe10c0..0be00d1f8ea3db91c0f0e13f453330f90ff39eab 100644 |
--- a/chrome/browser/ui/autofill/autofill_popup_controller_impl.cc |
+++ b/chrome/browser/ui/autofill/autofill_popup_controller_impl.cc |
@@ -39,14 +39,11 @@ const size_t kRowHeight = 24; |
// The vertical height of a separator in pixels. |
const size_t kSeparatorHeight = 1; |
-// The amount of minimum padding between the Autofill name and subtext in |
-// pixels. |
-const size_t kNamePadding = 15; |
- |
// The maximum amount of characters to display from either the name or subtext. |
const size_t kMaxTextLength = 15; |
#if !defined(OS_ANDROID) |
+const size_t kNamePadding = AutofillPopupView::kNamePadding; |
const size_t kIconPadding = AutofillPopupView::kIconPadding; |
const size_t kEndPadding = AutofillPopupView::kEndPadding; |
const size_t kAutofillIconWidth = AutofillPopupView::kAutofillIconWidth; |
@@ -501,7 +498,10 @@ int AutofillPopupControllerImpl::GetDesiredPopupHeight() const { |
} |
int AutofillPopupControllerImpl::RowWidthWithoutText(int row) const { |
- int row_size = kEndPadding + kNamePadding; |
+ int row_size = kEndPadding; |
+ |
+ if (!subtexts_[row].empty()) |
+ row_size += kNamePadding; |
// Add the Autofill icon size, if required. |
if (!icons_[row].empty()) |