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

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

Issue 2895473005: [Payments] Have expiration date be on the same line in CC editor (Closed)
Patch Set: Initial 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/validating_combobox.cc
diff --git a/chrome/browser/ui/views/payments/validating_combobox.cc b/chrome/browser/ui/views/payments/validating_combobox.cc
index d9e26811e9cf88f850f66b0c188e7823ee2bf2b9..76797850eadeed1a7ff47b73a007895b4c690950 100644
--- a/chrome/browser/ui/views/payments/validating_combobox.cc
+++ b/chrome/browser/ui/views/payments/validating_combobox.cc
@@ -23,11 +23,9 @@ ValidatingCombobox::~ValidatingCombobox() {}
void ValidatingCombobox::OnBlur() {
Combobox::OnBlur();
- // The first validation should be on a blur. The subsequent validations will
- // occur when the content changes. Do not validate if the view is being
- // removed.
- if (!was_blurred_ && !being_removed_) {
- was_blurred_ = true;
+ // Vvalidations will occur when the content changes. Do not validate if the
anthonyvd 2017/05/19 19:16:59 Nit: Validations
Mathieu 2017/05/19 21:13:46 Done.
+ // view is being removed.
+ if (!being_removed_) {
Validate();
}
}
@@ -39,11 +37,6 @@ void ValidatingCombobox::ViewHierarchyChanged(
}
void ValidatingCombobox::OnContentsChanged() {
- // Validation on every keystroke only happens if the field has been validated
- // before as part of a blur.
- if (!was_blurred_)
- return;
-
Validate();
}

Powered by Google App Engine
This is Rietveld 408576698