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

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

Issue 1409293007: new URL('') should throw TypeError (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updating test expectations Created 5 years, 1 month 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: 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 807a0d1e6bf8ea200228f63ef96d93000f890c73..9521d669323d8eea82dcfe06219ad6dcae164b01 100644
--- a/components/autofill/content/renderer/form_autofill_util.cc
+++ b/components/autofill/content/renderer/form_autofill_util.cc
@@ -1121,7 +1121,8 @@ 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;
+ const bool action_is_empty = canonical_action == canonical_origin
vabr (Chromium) 2015/11/06 11:24:14 nit: Could you please comment that omitting the ac
ramya.v 2015/11/06 13:45:14 Done.
+ || canonical_action.is_empty();
vabr (Chromium) 2015/11/06 11:24:14 Could you swap the order of the checks, so that is
ramya.v 2015/11/06 13:45:14 Done.
#endif
// Since empty or unspecified action fields are automatically set to page URL,
@@ -1137,7 +1138,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 == frame_url
+ || iter_canonical_action.is_empty();
if (action_is_empty != form_action_is_empty)
continue;

Powered by Google App Engine
This is Rietveld 408576698