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

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

Issue 204343004: Add supports that allow Autofill to be initiated from textarea field (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Exclude textarea for autocomplete preview and fill. Hope this fixes the crash. Created 6 years, 9 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/autocomplete_history_manager.cc
diff --git a/components/autofill/core/browser/autocomplete_history_manager.cc b/components/autofill/core/browser/autocomplete_history_manager.cc
index 6562157e946e7a302901ff269092eb20f4635e34..7795063da3824cf296a2016b0d66359de0ee4e47 100644
--- a/components/autofill/core/browser/autocomplete_history_manager.cc
+++ b/components/autofill/core/browser/autocomplete_history_manager.cc
@@ -81,6 +81,7 @@ void AutocompleteHistoryManager::OnGetAutocompleteSuggestions(
int query_id,
const base::string16& name,
const base::string16& prefix,
+ const std::string form_control_type,
const std::vector<base::string16>& autofill_values,
const std::vector<base::string16>& autofill_labels,
const std::vector<base::string16>& autofill_icons,
@@ -92,7 +93,9 @@ void AutocompleteHistoryManager::OnGetAutocompleteSuggestions(
autofill_labels_ = autofill_labels;
autofill_icons_ = autofill_icons;
autofill_unique_ids_ = autofill_unique_ids;
- if (!manager_delegate_->IsAutocompleteEnabled()) {
+ // Don't return autocomplete suggestions for textarea.
Ilya Sherman 2014/03/19 23:47:42 nit: This comment is redundant with the code; plea
ziran.sun 2014/03/20 19:03:41 Done.
+ if (!manager_delegate_->IsAutocompleteEnabled() ||
+ form_control_type == "textarea") {
SendSuggestions(NULL);
return;
}
« no previous file with comments | « components/autofill/core/browser/autocomplete_history_manager.h ('k') | components/autofill/core/browser/autofill_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698