diff options
author | mpearson@chromium.org <mpearson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-28 19:37:23 +0000 |
---|---|---|
committer | mpearson@chromium.org <mpearson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-28 19:37:23 +0000 |
commit | 529d4b5e6a4769eec4ebde8c48231fae3ab3c8aa (patch) | |
tree | 51c0ee355cf7b949c2ee228edbf5958ea9bcc13d /content/browser | |
parent | 2f5a9fe7f845446a115d896433fe88698cba7eea (diff) | |
download | chromium_src-529d4b5e6a4769eec4ebde8c48231fae3ab3c8aa.zip chromium_src-529d4b5e6a4769eec4ebde8c48231fae3ab3c8aa.tar.gz chromium_src-529d4b5e6a4769eec4ebde8c48231fae3ab3c8aa.tar.bz2 |
Omnibox: Highlight Matches in URLs Properly
Previously we'd match the omnibox input against a cleaned-up version of
the URL. Precisely, we'd remove the escaping and interpret as UTF8 (and
lower-case it) so non-Latin characters can be matched correctly. This is
all well and good, but then we'd take the offsets of those matches
and use them to highlight segments of the original URL (properly escaped).
Oops. At best this caused bad highlighting; at middle, it caused weirdness
as we attempted to highlight the middle of a multi-string character;
at worst, it'd cause crashes because our offsets calculation would put
us in no-man's-land.
This fixes all that. :-)
Precisely, we keep track of the adjustments made during cleaning. We
take the offsets where terms matched and apply them through the
transformation in reverse.
TBR=sky
(as usual for history and bookmarks stuff that just change internals relative to how they behave with the omnibox)
BUG=252630,359270
Review URL: https://codereview.chromium.org/255423002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@266630 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser')
0 files changed, 0 insertions, 0 deletions