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

Unified Diff: chrome/browser/ui/views/payments/shipping_address_editor_view_controller.cc

Issue 2871873003: [Payments] Fix up field widths in desktop editors. (Closed)
Patch Set: addressed comments Created 3 years, 7 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
Index: chrome/browser/ui/views/payments/shipping_address_editor_view_controller.cc
diff --git a/chrome/browser/ui/views/payments/shipping_address_editor_view_controller.cc b/chrome/browser/ui/views/payments/shipping_address_editor_view_controller.cc
index ea3f69437a211835954864fe418bf9d8a6f71e5b..a5f43f9fb610b0d97cbbcd082763b4f6ba61d4c9 100644
--- a/chrome/browser/ui/views/payments/shipping_address_editor_view_controller.cc
+++ b/chrome/browser/ui/views/payments/shipping_address_editor_view_controller.cc
@@ -267,11 +267,11 @@ void ShippingAddressEditorViewController::UpdateEditorFields() {
NOTREACHED();
return;
}
- EditorField::LengthHint length_hint = EditorField::LengthHint::HINT_LONG;
- if (field_length == autofill::kShortField)
- length_hint = EditorField::LengthHint::HINT_SHORT;
+ EditorField::LengthHint length_hint = EditorField::LengthHint::HINT_SHORT;
+ if (field_length == autofill::kLongField)
+ length_hint = EditorField::LengthHint::HINT_LONG;
else
- DCHECK_EQ(autofill::kLongField, field_length);
+ DCHECK_EQ(autofill::kShortField, field_length);
autofill::ServerFieldType server_field_type =
GetFieldTypeFromString(field_type);
EditorField::ControlType control_type =
@@ -291,7 +291,7 @@ void ShippingAddressEditorViewController::UpdateEditorFields() {
autofill::ADDRESS_HOME_COUNTRY,
l10n_util::GetStringUTF16(
IDS_LIBADDRESSINPUT_COUNTRY_OR_REGION_LABEL),
- EditorField::LengthHint::HINT_LONG, /*required=*/true,
+ EditorField::LengthHint::HINT_SHORT, /*required=*/true,
EditorField::ControlType::COMBOBOX);
}
}
@@ -300,7 +300,7 @@ void ShippingAddressEditorViewController::UpdateEditorFields() {
editor_fields_.emplace_back(
autofill::PHONE_HOME_WHOLE_NUMBER,
l10n_util::GetStringUTF16(IDS_AUTOFILL_FIELD_LABEL_PHONE),
- EditorField::LengthHint::HINT_LONG, /*required=*/true,
+ EditorField::LengthHint::HINT_SHORT, /*required=*/true,
EditorField::ControlType::TEXTFIELD);
}

Powered by Google App Engine
This is Rietveld 408576698