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

Issue 2854423002: [omnibox] Use suggestion instead of input for base text (Closed)

Created:
3 years, 7 months ago by Kevin Bailey
Modified:
3 years, 7 months ago
CC:
chromium-reviews, jdonnelly+watch_chromium.org, groby-ooo-7-16
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

[omnibox] Use suggestion instead of input for base text Tail suggestions want to line up the suggested completion e.g. "e" or "f" after the input text that they are completing "a b c d": a b c d ------- a b c d e a b c d f but they replace the some of the input text with an ellipsis: a b c d ... d e ... d f To line up the text correctly, the render code needs to know the text that is missing e.g. "a b c" (since the ellipsis is much shorter.) The code was passing a numerical index just past the "a b c", but was passing the input text, which might not be the prefix of the suggestion. (Suggestions can be stale, albeit temporarily.) This change replaces sending the input text with the actual text that the index was calculated from (the suggestion) guaranteeing that the index is valid. BUG=717152 Review-Url: https://codereview.chromium.org/2854423002 Cr-Commit-Position: refs/heads/master@{#470941} Committed: https://chromium.googlesource.com/chromium/src/+/c6737bb033e394fa654ef8ac2faa12306aaf062d

Patch Set 1 #

Patch Set 2 : Rename #

Total comments: 4

Patch Set 3 : Unit test #

Patch Set 4 : Better name #

Total comments: 8

Patch Set 5 : Nits and rename #

Patch Set 6 : New class needs destructor #

Patch Set 7 : Remove redundant class #

Unified diffs Side-by-side diffs Delta from patch set Stats (+47 lines, -7 lines) Patch
M chrome/browser/ui/cocoa/omnibox/omnibox_popup_cell.mm View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/omnibox/omnibox_result_view.cc View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M components/omnibox/browser/autocomplete_match.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M components/omnibox/browser/base_search_provider.cc View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M components/omnibox/browser/base_search_provider_unittest.cc View 1 2 3 4 5 6 4 chunks +41 lines, -1 line 0 comments Download

Messages

Total messages: 30 (12 generated)
Kevin Bailey
Appears to fix both backspacing quickly and select and replace DCHECK.
3 years, 7 months ago (2017-05-03 16:10:49 UTC) #3
Peter Kasting
What do you mean by "reasons of asynchronicity"? When would the input text ever be ...
3 years, 7 months ago (2017-05-04 23:30:23 UTC) #4
Peter Kasting
Does this have to do with when we preserve old matches temporarily as we start ...
3 years, 7 months ago (2017-05-04 23:31:15 UTC) #5
Kevin Bailey
On 2017/05/04 23:31:15, Peter Kasting (catching up) wrote: > Does this have to do with ...
3 years, 7 months ago (2017-05-05 00:22:34 UTC) #6
Peter Kasting
On 2017/05/05 00:22:34, Kevin Bailey wrote: > On 2017/05/04 23:31:15, Peter Kasting (catching up) wrote: ...
3 years, 7 months ago (2017-05-05 00:28:02 UTC) #7
Kevin Bailey
On 2017/05/05 00:28:02, Peter Kasting (catching up) wrote: > On 2017/05/05 00:22:34, Kevin Bailey wrote: ...
3 years, 7 months ago (2017-05-05 00:32:13 UTC) #8
Peter Kasting
On 2017/05/05 00:32:13, Kevin Bailey wrote: > On 2017/05/05 00:28:02, Peter Kasting (catching up) wrote: ...
3 years, 7 months ago (2017-05-05 00:37:01 UTC) #9
Kevin Bailey
On 2017/05/05 00:37:01, Peter Kasting (catching up) wrote: > On 2017/05/05 00:32:13, Kevin Bailey wrote: ...
3 years, 7 months ago (2017-05-06 19:56:45 UTC) #12
Peter Kasting
So did you determine for sure that this happens due to preserving old matches during ...
3 years, 7 months ago (2017-05-06 20:13:07 UTC) #13
Avi (use Gerrit)
It's not clear why I was added as a reviewer. If for the cocoa side ...
3 years, 7 months ago (2017-05-06 21:53:22 UTC) #14
Kevin Bailey
pkasting wrote: > So did you determine for sure that this happens due to preserving ...
3 years, 7 months ago (2017-05-06 21:55:01 UTC) #15
Kevin Bailey
On 2017/05/06 21:53:22, Avi (ping after 24h) wrote: > It's not clear why I was ...
3 years, 7 months ago (2017-05-06 21:56:52 UTC) #16
Peter Kasting
Can we test this? Maybe the process of writing the test will make it maximally ...
3 years, 7 months ago (2017-05-07 00:54:04 UTC) #17
Kevin Bailey
On 2017/05/07 00:54:04, Peter Kasting wrote: > Can we test this? Maybe the process of ...
3 years, 7 months ago (2017-05-09 17:02:12 UTC) #18
Peter Kasting
LGTM https://codereview.chromium.org/2854423002/diff/20001/components/omnibox/browser/base_search_provider.cc File components/omnibox/browser/base_search_provider.cc (right): https://codereview.chromium.org/2854423002/diff/20001/components/omnibox/browser/base_search_provider.cc#newcode256 components/omnibox/browser/base_search_provider.cc:256: match.RecordAdditionalInfo(kACMatchPropertyContentsText, On 2017/05/06 21:55:01, Kevin Bailey wrote: > ...
3 years, 7 months ago (2017-05-10 20:38:12 UTC) #19
Kevin Bailey
https://codereview.chromium.org/2854423002/diff/20001/components/omnibox/browser/base_search_provider.cc File components/omnibox/browser/base_search_provider.cc (right): https://codereview.chromium.org/2854423002/diff/20001/components/omnibox/browser/base_search_provider.cc#newcode256 components/omnibox/browser/base_search_provider.cc:256: match.RecordAdditionalInfo(kACMatchPropertyContentsText, On 2017/05/10 20:38:11, Peter Kasting wrote: > On ...
3 years, 7 months ago (2017-05-11 13:27:38 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2854423002/120001
3 years, 7 months ago (2017-05-11 13:28:20 UTC) #27
commit-bot: I haz the power
3 years, 7 months ago (2017-05-11 13:35:07 UTC) #30
Message was sent while issue was closed.
Committed patchset #7 (id:120001) as
https://chromium.googlesource.com/chromium/src/+/c6737bb033e394fa654ef8ac2faa...

Powered by Google App Engine
This is Rietveld 408576698