| Index: components/autofill/content/renderer/form_autofill_util.cc
|
| diff --git a/components/autofill/content/renderer/form_autofill_util.cc b/components/autofill/content/renderer/form_autofill_util.cc
|
| index 9677f8c184a7bfb23fe3f38e50ed461c3b9d9150..51c745fdb5253cc1f0c28c746ea1f677beb2a098 100644
|
| --- a/components/autofill/content/renderer/form_autofill_util.cc
|
| +++ b/components/autofill/content/renderer/form_autofill_util.cc
|
| @@ -1203,6 +1203,7 @@ bool ExtractFormData(const WebFormElement& form_element, FormData* data) {
|
| }
|
|
|
| bool IsFormVisible(blink::WebFrame* frame,
|
| + const blink::WebFormElement& form_element,
|
| const GURL& canonical_action,
|
| const GURL& canonical_origin,
|
| const FormData& form_data) {
|
| @@ -1226,6 +1227,11 @@ bool IsFormVisible(blink::WebFrame* frame,
|
| if (!AreFormContentsVisible(form))
|
| continue;
|
|
|
| + // Try to match the WebFormElement reference first.
|
| + if (!form_element.isNull() && form == form_element) {
|
| + return true; // Form still exists.
|
| + }
|
| +
|
| GURL iter_canonical_action = GetCanonicalActionForForm(form);
|
| bool form_action_is_empty = iter_canonical_action.is_empty() ||
|
| iter_canonical_action == frame_origin;
|
|
|