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

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

Issue 621503003: Exclude readonly and disabled elements from autofill form. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update test expectations for FormStructure browser_tests. Created 6 years, 3 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
« no previous file with comments | « chrome/test/data/autofill/heuristics/output/15_crbug_40687.out ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 10d6cca9160885f95957ec482b9403489fa5999b..3754aebbc3c59428539137de9f333b5081b7c96c 100644
--- a/components/autofill/content/renderer/form_autofill_util.cc
+++ b/components/autofill/content/renderer/form_autofill_util.cc
@@ -725,7 +725,9 @@ void ExtractAutofillableElements(
autofillable_elements->clear();
for (size_t i = 0; i < control_elements.size(); ++i) {
WebFormControlElement element = control_elements[i];
- if (!IsAutofillableElement(element))
+ if (!IsAutofillableElement(element) ||
+ element.isReadOnly() ||
+ !element.isEnabled())
Mike West 2014/10/02 12:49:57 Why not fold this into IsAutofillable{Input?}Eleme
continue;
if (requirements & REQUIRE_AUTOCOMPLETE) {
@@ -866,7 +868,9 @@ bool WebFormElementToFormData(
for (size_t i = 0; i < control_elements.size(); ++i) {
const WebFormControlElement& control_element = control_elements[i];
- if (!IsAutofillableElement(control_element))
+ if (!IsAutofillableElement(control_element) ||
+ control_element.isReadOnly() ||
+ !control_element.isEnabled())
continue;
const WebInputElement* input_element = toWebInputElement(&control_element);
« no previous file with comments | « chrome/test/data/autofill/heuristics/output/15_crbug_40687.out ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698