Commit 22f4589a authored by manukh's avatar manukh Committed by Commit Bot

[omnibox] [rich-autocompletion] Fix trailing space matching history URL

The History URL provider cleans up trailing whitespace from the input
when matching suggestions. However, using this clean input for rich
autocompletion results in inputs like 'g   ' matching suggestions like
'google.com' which would be displayed as 'g   |[oogle.com]'. This CL
uses the original input for rich autocompletion in the history URL
provider.

Bug: 1062446
Change-Id: If31c85a821f6dae924a1ccc8b36a83fcdff97791
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2392953Reviewed-by: default avatarTommy Li <tommycli@chromium.org>
Commit-Queue: manuk hovanesian <manukh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#805054}
parent 153159b0
...@@ -1265,7 +1265,7 @@ AutocompleteMatch HistoryURLProvider::HistoryMatchToACMatch( ...@@ -1265,7 +1265,7 @@ AutocompleteMatch HistoryURLProvider::HistoryMatchToACMatch(
// there can be no inline autocompletion, and the match must not be allowed to // there can be no inline autocompletion, and the match must not be allowed to
// be default. // be default.
if (match.TryRichAutocompletion(match.contents, match.description, if (match.TryRichAutocompletion(match.contents, match.description,
params.input)) { params.input_before_fixup)) {
// If rich autocompletion applies, we skip trying the alternatives below. // If rich autocompletion applies, we skip trying the alternatives below.
} else if (inline_autocomplete_offset != base::string16::npos) { } else if (inline_autocomplete_offset != base::string16::npos) {
DCHECK(inline_autocomplete_offset <= match.fill_into_edit.length()); DCHECK(inline_autocomplete_offset <= match.fill_into_edit.length());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment