Bug 581331 - BrowserUI.goToURI should always apply third-party fixup to URI [r=vingtetun]

This commit is contained in:
Mark Finkle 2010-07-23 09:02:44 -04:00
Родитель c3f0337beb
Коммит e347b1fe91
1 изменённых файлов: 5 добавлений и 4 удалений

Просмотреть файл

@ -495,12 +495,13 @@ var BrowserUI = {
let useLocal = Util.isLocalScheme(aURI); let useLocal = Util.isLocalScheme(aURI);
let hasLocal = Util.isLocalScheme(currentURI.spec); let hasLocal = Util.isLocalScheme(currentURI.spec);
if (hasLocal != useLocal) { if (hasLocal != useLocal) {
Browser.addTab(aURI, true); let tab = Browser.addTab("about:blank", true);
} else { tab.browser.stop();
let loadFlags = Ci.nsIWebNavigation.LOAD_FLAGS_ALLOW_THIRD_PARTY_FIXUP;
getBrowser().loadURIWithFlags(aURI, loadFlags, null, null);
} }
let loadFlags = Ci.nsIWebNavigation.LOAD_FLAGS_ALLOW_THIRD_PARTY_FIXUP;
getBrowser().loadURIWithFlags(aURI, loadFlags, null, null);
// Delay doing the fixup so the raw URI is passed to loadURIWithFlags // Delay doing the fixup so the raw URI is passed to loadURIWithFlags
// and the proper third-party fixup can be done // and the proper third-party fixup can be done
let fixupFlags = Ci.nsIURIFixup.FIXUP_FLAG_ALLOW_KEYWORD_LOOKUP; let fixupFlags = Ci.nsIURIFixup.FIXUP_FLAG_ALLOW_KEYWORD_LOOKUP;