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

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

Issue 2704503002: [Autofill] Add Chrome flag that annotates web forms with form and field signatures (Closed)
Patch Set: Created 3 years, 10 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
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 e134d849f46f3db483d14ac08758e6e35bc9e030..9677f8c184a7bfb23fe3f38e50ed461c3b9d9150 100644
--- a/components/autofill/content/renderer/form_autofill_util.cc
+++ b/components/autofill/content/renderer/form_autofill_util.cc
@@ -102,13 +102,6 @@ bool HasTagName(const WebNode& node, const blink::WebString& tag) {
return node.isElementNode() && node.toConst<WebElement>().hasHTMLTagName(tag);
}
-bool IsAutofillableElement(const WebFormControlElement& element) {
- const WebInputElement* input_element = toWebInputElement(&element);
- return IsAutofillableInputElement(input_element) ||
- IsSelectElement(element) ||
- IsTextAreaElement(element);
-}
-
bool IsElementInControlElementSet(
const WebElement& element,
const std::vector<WebFormControlElement>& control_elements) {
@@ -1319,6 +1312,12 @@ bool IsAutofillableInputElement(const WebInputElement* element) {
IsCheckableElement(element);
}
+bool IsAutofillableElement(const WebFormControlElement& element) {
+ const WebInputElement* input_element = toWebInputElement(&element);
+ return IsAutofillableInputElement(input_element) ||
+ IsSelectElement(element) || IsTextAreaElement(element);
+}
+
const base::string16 GetFormIdentifier(const WebFormElement& form) {
base::string16 identifier = form.name().utf16();
CR_DEFINE_STATIC_LOCAL(WebString, kId, ("id"));

Powered by Google App Engine
This is Rietveld 408576698