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

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

Issue 309063006: Do not autofill element when there is no autofill suggestion from profile (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mark is_autofilled property for autocomplete formdata result. 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
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 8bceedd686b0bc8d9a61a4f6bee5dcdac12f4ca8..8876f0048cacbe07f4fce942bc55b0bbab1c7a46 100644
--- a/components/autofill/core/browser/autofill_manager.cc
+++ b/components/autofill/core/browser/autofill_manager.cc
@@ -580,6 +580,11 @@ void AutofillManager::FillOrPreviewForm(
// user edits an autofilled field (for metrics).
form_structure->field(i)->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.
+ result.fields[i].is_autofilled = true;
+
if (should_notify)
manager_delegate_->DidFillOrPreviewField(value, profile_full_name);
}

Powered by Google App Engine
This is Rietveld 408576698