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

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

Issue 246833006: Filter out datalist values for textarea field from renderer side. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Filter out datalist values for textarea field on the renderer side. Created 6 years, 8 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 | « no previous file | 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 7cd6e929273a6d6d9de2dd5d7931fe7d4a5b5e4c..c6c53a3e47bf4d34f3ce1d5df42aade1209e8649 100644
--- a/components/autofill/content/renderer/autofill_agent.cc
+++ b/components/autofill/content/renderer/autofill_agent.cc
@@ -640,24 +640,24 @@ void AutofillAgent::QueryAutofillSuggestions(
gfx::RectF bounding_box_scaled =
GetScaledBoundingBox(web_view_->pageScaleFactor(), &element_);
+ std::vector<base::string16> data_list_values;
+ std::vector<base::string16> data_list_labels;
const WebInputElement* input_element = toWebInputElement(&element);
if (input_element) {
// Find the datalist values and send them to the browser process.
- std::vector<base::string16> data_list_values;
- std::vector<base::string16> data_list_labels;
GetDataListSuggestions(*input_element,
datalist_only,
&data_list_values,
&data_list_labels);
TrimStringVectorForIPC(&data_list_values);
TrimStringVectorForIPC(&data_list_labels);
-
- Send(new AutofillHostMsg_SetDataList(routing_id(),
- data_list_values,
- data_list_labels));
}
is_popup_possibly_visible_ = true;
+ Send(new AutofillHostMsg_SetDataList(routing_id(),
+ data_list_values,
+ data_list_labels));
Ilya Sherman 2014/04/29 20:29:30 Aha! This makes perfect sense -- we were showing
ziran.sun 2014/04/30 10:05:22 It might make sense to send one message rather tha
+
Send(new AutofillHostMsg_QueryFormFieldAutofill(routing_id(),
autofill_query_id_,
form,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698