| Index: chrome/browser/ui/views/autofill/autofill_popup_view_views.cc
|
| diff --git a/chrome/browser/ui/views/autofill/autofill_popup_view_views.cc b/chrome/browser/ui/views/autofill/autofill_popup_view_views.cc
|
| index ad9bd1d676f707874ef91c809544bfbe8ca8efab..48fcac1cc175e5572558c984dd6084449768c5d4 100644
|
| --- a/chrome/browser/ui/views/autofill/autofill_popup_view_views.cc
|
| +++ b/chrome/browser/ui/views/autofill/autofill_popup_view_views.cc
|
| @@ -150,9 +150,12 @@ void AutofillPopupViewViews::DrawAutofillEntry(gfx::Canvas* canvas,
|
| GetNativeTheme()->GetSystemColor(
|
| controller_->GetBackgroundColorIDForRow(index)));
|
|
|
| + const int frontend_id = controller_->GetSuggestionAt(index).frontend_id;
|
| const bool is_http_warning =
|
| - (controller_->GetSuggestionAt(index).frontend_id ==
|
| - POPUP_ITEM_ID_HTTP_NOT_SECURE_WARNING_MESSAGE);
|
| + (frontend_id == POPUP_ITEM_ID_HTTP_NOT_SECURE_WARNING_MESSAGE);
|
| + const bool icon_in_front_of_text =
|
| + (is_http_warning ||
|
| + frontend_id == POPUP_ITEM_ID_ALL_SAVED_PASSWORDS_ENTRY);
|
| const bool is_rtl = controller_->IsRTL();
|
| const int text_align =
|
| is_rtl ? gfx::Canvas::TEXT_ALIGN_RIGHT : gfx::Canvas::TEXT_ALIGN_LEFT;
|
| @@ -160,7 +163,7 @@ void AutofillPopupViewViews::DrawAutofillEntry(gfx::Canvas* canvas,
|
| value_rect.Inset(AutofillPopupLayoutModel::kEndPadding, 0);
|
|
|
| // If the icon is on the right of the rect, no matter in RTL or LTR mode.
|
| - bool icon_on_the_right = is_http_warning == is_rtl;
|
| + bool icon_on_the_right = icon_in_front_of_text == is_rtl;
|
| int x_align_left = icon_on_the_right ? value_rect.right() : value_rect.x();
|
|
|
| // Draw the Autofill icon, if one exists
|
| @@ -176,12 +179,12 @@ void AutofillPopupViewViews::DrawAutofillEntry(gfx::Canvas* canvas,
|
| canvas->DrawImageInt(image, icon_x_align_left, icon_y);
|
|
|
| // An icon was drawn; adjust the |x_align_left| value for the next element.
|
| - if (is_http_warning) {
|
| + if (icon_in_front_of_text) {
|
| x_align_left =
|
| icon_x_align_left +
|
| - (is_rtl ? -AutofillPopupLayoutModel::kHttpWarningIconPadding
|
| + (is_rtl ? -AutofillPopupLayoutModel::kPaddingAfterLeadingIcon
|
| : image.width() +
|
| - AutofillPopupLayoutModel::kHttpWarningIconPadding);
|
| + AutofillPopupLayoutModel::kPaddingAfterLeadingIcon);
|
| } else {
|
| x_align_left =
|
| icon_x_align_left +
|
| @@ -196,7 +199,7 @@ void AutofillPopupViewViews::DrawAutofillEntry(gfx::Canvas* canvas,
|
| controller_->layout_model().GetValueFontListForRow(index));
|
| int value_x_align_left = x_align_left;
|
|
|
| - if (is_http_warning) {
|
| + if (icon_in_front_of_text) {
|
| value_x_align_left += is_rtl ? -value_width : 0;
|
| } else {
|
| value_x_align_left =
|
|
|