| 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 6cf3b65fbe9a9e7742c41238754b9030f2da4bbf..e1869e8799f5df50391c4c215d4eb302506961d2 100644
|
| --- a/components/autofill/content/renderer/form_autofill_util.cc
|
| +++ b/components/autofill/content/renderer/form_autofill_util.cc
|
| @@ -1105,7 +1105,11 @@ bool IsFormVisible(blink::WebFrame* frame,
|
| frame->document().forms(forms);
|
|
|
| #if !defined(OS_MACOSX) && !defined(OS_ANDROID)
|
| - const bool action_is_empty = canonical_action == canonical_origin;
|
| + // Omitting the action attribute would result in |canonical_origin| for
|
| + // hierarchical schemes like http:, and in an empty URL for non-hierarchical
|
| + // schemes like about: or data: etc.
|
| + const bool action_is_empty = canonical_action.is_empty()
|
| + || canonical_action == canonical_origin;
|
| #endif
|
|
|
| // Since empty or unspecified action fields are automatically set to page URL,
|
| @@ -1120,7 +1124,8 @@ bool IsFormVisible(blink::WebFrame* frame,
|
|
|
| GURL iter_canonical_action = GetCanonicalActionForForm(form);
|
| #if !defined(OS_MACOSX) && !defined(OS_ANDROID)
|
| - bool form_action_is_empty = iter_canonical_action == frame_url;
|
| + bool form_action_is_empty = iter_canonical_action.is_empty()
|
| + || iter_canonical_action == frame_url;
|
|
|
| if (action_is_empty != form_action_is_empty)
|
| continue;
|
|
|