Created
July 16, 2012 19:52
-
-
Save peikk0/3124647 to your computer and use it in GitHub Desktop.
chromium-fix-urlbar.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This patch restores compliance with IETF RFC 3986 in Chromium: | |
* fixes the bug introduced in 2010, removing http:// in the URL bar without any option to bring it back: http://code.google.com/p/chromium/issues/detail?id=41467 | |
* reverts the removal of trailing slashes in the URL bar: http://code.google.com/p/chromium/issues/detail?id=43587 | |
--- chrome/browser/autocomplete/autocomplete.cc 2012-07-10 09:48:52.000000000 +0200 | |
+++ chrome/browser/autocomplete/autocomplete.cc 2012-07-16 20:57:19.078551682 +0200 | |
@@ -585,7 +585,7 @@ | |
return net::FormatUrl( | |
url, | |
languages, | |
- net::kFormatUrlOmitAll & ~(trim_http ? 0 : net::kFormatUrlOmitHTTP), | |
+ net::kFormatUrlOmitNothing, | |
net::UnescapeRule::SPACES, NULL, NULL, NULL); | |
} | |
--- chrome/browser/autocomplete/history_quick_provider.cc 2012-07-10 09:48:52.000000000 +0200 | |
+++ chrome/browser/autocomplete/history_quick_provider.cc 2012-07-16 21:00:53.799164269 +0200 | |
@@ -198,8 +198,7 @@ | |
// Format the URL autocomplete presentation. | |
std::vector<size_t> offsets = | |
OffsetsFromTermMatches(history_match.url_matches); | |
- const net::FormatUrlTypes format_types = net::kFormatUrlOmitAll & | |
- ~(!history_match.match_in_scheme ? 0 : net::kFormatUrlOmitHTTP); | |
+ const net::FormatUrlTypes format_types = net::kFormatUrlOmitNothing; | |
match.fill_into_edit = | |
AutocompleteInput::FormattedStringWithEquivalentMeaning(info.url(), | |
net::FormatUrlWithOffsets(info.url(), languages_, format_types, | |
--- chrome/browser/autocomplete/history_url_provider.cc 2012-07-10 09:48:52.000000000 +0200 | |
+++ chrome/browser/autocomplete/history_url_provider.cc 2012-07-16 21:01:23.480562914 +0200 | |
@@ -911,9 +911,7 @@ | |
history_match.input_location + params->input.text().length(); | |
std::string languages = (match_type == WHAT_YOU_TYPED) ? | |
std::string() : params->languages; | |
- const net::FormatUrlTypes format_types = net::kFormatUrlOmitAll & | |
- ~((params->trim_http && !history_match.match_in_scheme) ? | |
- 0 : net::kFormatUrlOmitHTTP); | |
+ const net::FormatUrlTypes format_types = net::kFormatUrlOmitNothing; | |
match.fill_into_edit = | |
AutocompleteInput::FormattedStringWithEquivalentMeaning(info.url(), | |
net::FormatUrl(info.url(), languages, format_types, | |
--- chrome/browser/ui/toolbar/toolbar_model.cc 2012-07-10 09:48:59.000000000 +0200 | |
+++ chrome/browser/ui/toolbar/toolbar_model.cc 2012-07-16 20:41:26.549562555 +0200 | |
@@ -63,7 +63,7 @@ | |
// and pastes it into another program, that program may think the URL ends at | |
// the space. | |
return AutocompleteInput::FormattedStringWithEquivalentMeaning( | |
- url, net::FormatUrl(url, languages, net::kFormatUrlOmitAll, | |
+ url, net::FormatUrl(url, languages, net::kFormatUrlOmitNothing, | |
net::UnescapeRule::NORMAL, NULL, NULL, NULL)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment