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

Unified Diff: components/autofill/core/browser/autofill_manager.cc

Issue 357653003: Mark the single autofilled field when the relevant section is autofilled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update code as per Ilya's review comments. Created 6 years, 6 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/core/browser/autofill_manager.cc
diff --git a/components/autofill/core/browser/autofill_manager.cc b/components/autofill/core/browser/autofill_manager.cc
index 370a8f02e4aeced484a49090925c117b1ca8e2c3..a69286272af7758ac2846601cadb43ed13f18077 100644
--- a/components/autofill/core/browser/autofill_manager.cc
+++ b/components/autofill/core/browser/autofill_manager.cc
@@ -569,6 +569,12 @@ void AutofillManager::FillOrPreviewForm(
// user edits an autofilled field (for metrics).
autofill_field->is_autofilled = true;
+ // Mark the field as autofilled when a non-empty value is assigned to
+ // it. This allows the renderer to distinguish autofilled fields from
+ // fields with non-empty values, such as select-one fields.
+ int index = iter - result.fields.begin();
+ result.fields[index].is_autofilled = true;
Ilya Sherman 2014/06/27 05:59:08 Why do you need an index? Can you just write this
+
if (!is_credit_card && !value.empty())
client_->DidFillOrPreviewField(value, profile_full_name);
}
« 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