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

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

Issue 498653003: Do not set autofill property for datalist options (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adjust format. Created 6 years, 4 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/browser/autofill/autofill_interactive_uitest.cc ('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/autofill_agent.cc
diff --git a/components/autofill/content/renderer/autofill_agent.cc b/components/autofill/content/renderer/autofill_agent.cc
index ab9bfae2cc956d59d0b93a3ca2b35b0ef60aa9d9..bab2b4d82a0f060e76402831f01677e38662e19a 100644
--- a/components/autofill/content/renderer/autofill_agent.cc
+++ b/components/autofill/content/renderer/autofill_agent.cc
@@ -488,8 +488,10 @@ void AutofillAgent::OnClearPreviewedForm() {
void AutofillAgent::OnFillFieldWithValue(const base::string16& value) {
WebInputElement* input_element = toWebInputElement(&element_);
- if (input_element)
+ if (input_element) {
FillFieldWithValue(value, input_element);
+ input_element->setAutofilled(true);
+ }
}
void AutofillAgent::OnPreviewFieldWithValue(const base::string16& value) {
@@ -674,7 +676,6 @@ void AutofillAgent::FillFieldWithValue(const base::string16& value,
WebInputElement* node) {
did_set_node_text_ = true;
node->setEditingValue(value.substr(0, node->maxLength()));
- node->setAutofilled(true);
}
void AutofillAgent::PreviewFieldWithValue(const base::string16& value,
« no previous file with comments | « chrome/browser/autofill/autofill_interactive_uitest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698