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

Unified Diff: components/autofill/content/renderer/autofill_agent.cc

Issue 17391012: Implement 'invalid' AutocompleteErrorEvent#reason (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 6 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 | « chrome/browser/ui/views/autofill/autofill_dialog_views.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/autofill/content/renderer/autofill_agent.cc
diff --git a/components/autofill/content/renderer/autofill_agent.cc b/components/autofill/content/renderer/autofill_agent.cc
index fbf59af641ce1de325a862eb7ca6cad466f62f23..b8a08b05dc95639495eb1bf47e66083b4c16115f 100644
--- a/components/autofill/content/renderer/autofill_agent.cc
+++ b/components/autofill/content/renderer/autofill_agent.cc
@@ -744,8 +744,11 @@ void AutofillAgent::OnRequestAutocompleteResult(
if (in_flight_request_form_.isNull())
return;
- if (result == WebFormElement::AutocompleteResultSuccess)
+ if (result == WebFormElement::AutocompleteResultSuccess) {
FillFormIncludingNonFocusableElements(form_data, in_flight_request_form_);
+ if (!in_flight_request_form_.checkValidityWithoutDispatchingEvents())
+ result = WebFormElement::AutocompleteResultErrorInvalid;
+ }
in_flight_request_form_.finishRequestAutocomplete(result);
in_flight_request_form_.reset();
« no previous file with comments | « chrome/browser/ui/views/autofill/autofill_dialog_views.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698