Index: components/autofill/content/browser/request_autocomplete_manager.cc |
diff --git a/components/autofill/content/browser/request_autocomplete_manager.cc b/components/autofill/content/browser/request_autocomplete_manager.cc |
index cf4712bf6fa2c97cf97bea24613b66ab38cbdacb..8d6dc5a08fd2b0b49694962937b107dbffccd7ba 100644 |
--- a/components/autofill/content/browser/request_autocomplete_manager.cc |
+++ b/components/autofill/content/browser/request_autocomplete_manager.cc |
@@ -76,11 +76,20 @@ void RequestAutocompleteManager::ReturnAutocompleteResult( |
if (!host) |
return; |
+ FormData form_data; |
+ if (form_structure) { |
+ form_data = form_structure->ToFormData(); |
+ for (size_t i = 0; i < form_data.fields.size(); ++i) { |
+ if(!form_data.fields[i].value.empty()) |
+ form_data.fields[i].is_autofilled = true; |
+ } |
+ } |
+ |
host->Send(new AutofillMsg_RequestAutocompleteResult( |
host->GetRoutingID(), |
ToWebkitAutocompleteResult(result), |
debug_message, |
- form_structure ? form_structure->ToFormData() : FormData())); |
+ form_data)); |
} |
void RequestAutocompleteManager::ShowRequestAutocompleteDialog( |