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

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

Issue 962673004: [Autofill/Autocomplete Feature] Substring matching instead of prefix matching. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Incorporated Rouslan's review comments. Created 5 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/content/renderer/autofill_agent.cc
diff --git a/components/autofill/content/renderer/autofill_agent.cc b/components/autofill/content/renderer/autofill_agent.cc
index 79542aff2520a500debcf60c29699d73e28d5524..01ccbe828ddc1934ead43d7badd021da74ca9b19 100644
--- a/components/autofill/content/renderer/autofill_agent.cc
+++ b/components/autofill/content/renderer/autofill_agent.cc
@@ -740,8 +740,7 @@ void AutofillAgent::PreviewFieldWithValue(const base::string16& value,
was_query_node_autofilled_ = element_.isAutofilled();
node->setSuggestedValue(value.substr(0, node->maxLength()));
node->setAutofilled(true);
- node->setSelectionRange(node->value().length(),
- node->suggestedValue().length());
+ PreviewSuggestion(node, value, node->value());
please use gerrit instead 2015/06/30 19:06:23 Pass in node->suggestedValue() instead of "value",
Pritam Nikam 2015/07/01 17:25:59 Done.
}
void AutofillAgent::ProcessForms() {

Powered by Google App Engine
This is Rietveld 408576698