|
Fix various problems with inline autocomplete and URLs that change length during fixup:
* URLs with http auth info, which gets stripped
* URLs with IDN hosts
* URLs with escaped values that get unescaped
In cases like these, we'd inline autocomplete from the wrong locations, highlight the wrong portions of the URL as matches, and sometimes DCHECK() in debug mode.
The fix is to track how fixup affects the offsets into the URL we care about. Plumbing this required an enormous number of additions :(
There is also a fix here to the URL Fixer Upper, which was obviously modified at some point in the past to use the Parsed components, but without updating the comments or some of the functionality to match. Since this isn't supposed to "fix up" things that aren't simple typos, I removed some code to "fix" bogus ports, which was causing bizarre effects when typing HTTP auth URLs ("http://foo:bar" would be fixed to "http://foo" and then matched for inline autocompletion, which was clearly wrong). This is tested incidentally by one of the new History URL Provider tests (which is how I discovered it).
BUG= 4010
TEST=Covered by unittests
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=31352
Total comments: 8
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+1158 lines, -2060 lines) |
Patch |
|
M |
app/gfx/text_elider.cc
|
View
|
|
3 chunks |
+5 lines, -5 lines |
0 comments
|
Download
|
|
M |
base/base.gyp
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
base/i18n/icu_string_conversions.h
|
View
|
|
3 chunks |
+35 lines, -8 lines |
0 comments
|
Download
|
|
M |
base/i18n/icu_string_conversions.cc
|
View
|
1
2
|
3 chunks |
+128 lines, -76 lines |
0 comments
|
Download
|
|
M |
base/i18n/icu_string_conversions_unittest.cc
|
View
|
1
2
|
8 chunks |
+48 lines, -7 lines |
0 comments
|
Download
|
|
M |
base/string_util_unittest.cc
|
View
|
1
2
|
2 chunks |
+1 line, -198 lines |
0 comments
|
Download
|
|
M |
base/utf_string_conversions.h
|
View
|
|
2 chunks |
+58 lines, -8 lines |
0 comments
|
Download
|
|
M |
base/utf_string_conversions.cc
|
View
|
1
|
6 chunks |
+142 lines, -111 lines |
0 comments
|
Download
|
|
A + |
base/utf_string_conversions_unittest.cc
|
View
|
1
2
|
10 chunks |
+74 lines, -1316 lines |
0 comments
|
Download
|
|
M |
chrome/browser/autocomplete/autocomplete.h
|
View
|
|
2 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
|
M |
chrome/browser/autocomplete/autocomplete.cc
|
View
|
|
2 chunks |
+3 lines, -4 lines |
0 comments
|
Download
|
|
M |
chrome/browser/autocomplete/history_url_provider.h
|
View
|
|
4 chunks |
+10 lines, -10 lines |
0 comments
|
Download
|
|
M |
chrome/browser/autocomplete/history_url_provider.cc
|
View
|
|
3 chunks |
+39 lines, -20 lines |
0 comments
|
Download
|
|
M |
chrome/browser/autocomplete/history_url_provider_unittest.cc
|
View
|
|
5 chunks |
+28 lines, -1 line |
0 comments
|
Download
|
|
M |
chrome/browser/bookmarks/bookmark_table_model.cc
|
View
|
|
2 chunks |
+3 lines, -4 lines |
0 comments
|
Download
|
|
M |
chrome/browser/bookmarks/bookmark_utils.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
chrome/browser/gtk/options/exceptions_page_gtk.cc
|
View
|
|
1 chunk |
+1 line, -2 lines |
0 comments
|
Download
|
|
M |
chrome/browser/gtk/options/passwords_page_gtk.cc
|
View
|
|
1 chunk |
+1 line, -2 lines |
0 comments
|
Download
|
|
M |
chrome/browser/gtk/options/url_picker_dialog_gtk.cc
|
View
|
|
1 chunk |
+2 lines, -3 lines |
0 comments
|
Download
|
|
M |
chrome/browser/net/browser_url_util.cc
|
View
|
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
chrome/browser/net/url_fixer_upper.cc
|
View
|
|
6 chunks |
+9 lines, -26 lines |
0 comments
|
Download
|
|
M |
chrome/browser/net/url_fixer_upper_unittest.cc
|
View
|
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
chrome/browser/tab_contents/tab_contents.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
chrome/browser/toolbar_model.cc
|
View
|
|
2 chunks |
+3 lines, -2 lines |
0 comments
|
Download
|
|
M |
chrome/browser/views/bookmark_editor_view.cc
|
View
|
|
2 chunks |
+3 lines, -4 lines |
0 comments
|
Download
|
|
M |
chrome/browser/views/url_picker.cc
|
View
|
|
2 chunks |
+3 lines, -4 lines |
0 comments
|
Download
|
|
M |
net/base/escape.h
|
View
|
|
2 chunks |
+12 lines, -12 lines |
0 comments
|
Download
|
|
M |
net/base/escape.cc
|
View
|
|
4 chunks |
+33 lines, -9 lines |
0 comments
|
Download
|
|
M |
net/base/escape_unittest.cc
|
View
|
|
9 chunks |
+80 lines, -45 lines |
0 comments
|
Download
|
|
M |
net/base/net_util.h
|
View
|
|
3 chunks |
+39 lines, -18 lines |
0 comments
|
Download
|
|
M |
net/base/net_util.cc
|
View
|
1
|
12 chunks |
+222 lines, -131 lines |
0 comments
|
Download
|
|
M |
net/base/net_util_unittest.cc
|
View
|
1
|
11 chunks |
+162 lines, -21 lines |
0 comments
|
Download
|
Total messages: 3 (0 generated)
|