| 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 6e9b547a8afcc0b7fc3a001b70f1b501b1eb6511..04ed410cc7a1c58646946035cee8e93498aaf6a8 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();
|
|
|