Chromium Code Reviews
DescriptionOmnibox: Add Mid-Input Matching to HistoryQuick Provider
The idea:
Suppose I've previously visited
http://www.foobar.com/~mpearson/resume.html
http://www.foobar.com/~sky/resume.html
http://www.foobar.com/~pkasting/resume.html
http://www.foobar.com/~swedish-chef/resume.html
Suppose I have
http://www.foobar.com/~mpearson/resume.html
in the omnibox and then highlight "~mpearson" and press delete, leaving
http://www.foobar.com//resume.html
in the omnibox with the cursor between the two slashes.
I want to see some/all of those URLs I listed.
The current behavior of HistoryQuick provider doesn't show any matches in this situation.
This change remedies this issue.
It also adds a field trial to enable and test this new behavior.
There are some oddities that can happen by allowing the text to break at the cursor. For instance, suppose the text is google.com. This clearly matches the URL http://www.google.com/. Now suppose the user puts his cursor after the "goo" and types "gle", leaving the omnibox with googlegle.com with the cursor between the two "gle"s. This will still match http://www.google.com/, as before, because both the two terms match (google and gle.com), just in an overlapping fashion.
I played around with this and it's not as surprising as it sounds. In effect, this means that if you put the cursor in the middle of a URL and "type through" the URL, the URL will always remain as a suggestion. That kind of makes some sense.
BUG=163932
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=181065
Patch Set 1 #
Total comments: 6
Patch Set 2 : Actual code + Peter's comments. #
Total comments: 2
Patch Set 3 : Peter's suggestions. #Patch Set 4 : added field trial; revised and added tests #Patch Set 5 : actually put users in the experiment group #
Total comments: 6
Patch Set 6 : minor comment change #
Total comments: 2
Patch Set 7 : fix typo in comment #
Messages
Total messages: 15 (0 generated)
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||