зеркало из https://github.com/mozilla/gecko-dev.git
b=445327, r=gavin. Cleanup goToURI code
This commit is contained in:
Родитель
22da1be426
Коммит
2c9bd4f3ff
|
@ -129,4 +129,7 @@ pref("browser.display.focus_text_color", "#00000");
|
|||
pref("dom.disable_open_during_load", true);
|
||||
pref("privacy.popups.showBrowserMessage", true);
|
||||
|
||||
pref("keyword.enabled", true);
|
||||
pref("keyword.URL", "http://www.google.com/search?q=");
|
||||
|
||||
pref("snav.enabled", true);
|
||||
|
|
|
@ -222,22 +222,8 @@ var BrowserUI = {
|
|||
if (!aURI)
|
||||
aURI = this._edit.value;
|
||||
|
||||
if (!this._URIFixup)
|
||||
this._URIFixup = Cc["@mozilla.org/docshell/urifixup;1"].getService(Ci.nsIURIFixup);
|
||||
|
||||
try {
|
||||
aURI = this._URIFixup.createFixupURI(aURI, 0);
|
||||
aURI = this._URIFixup.createExposableURI(aURI);
|
||||
}
|
||||
catch (ex) {
|
||||
aURI = null;
|
||||
}
|
||||
|
||||
if (aURI == null)
|
||||
this.search();
|
||||
else
|
||||
getBrowser().loadURI(aURI.spec, null, null, false);
|
||||
|
||||
var flags = Ci.nsIWebNavigation.LOAD_FLAGS_ALLOW_THIRD_PARTY_FIXUP;
|
||||
getBrowser().loadURIWithFlags(aURI, flags, null, null);
|
||||
this._showMode(PANELMODE_VIEW);
|
||||
},
|
||||
|
||||
|
@ -542,7 +528,7 @@ var BookmarkHelper = {
|
|||
this._item = null;
|
||||
BrowserUI.hide();
|
||||
},
|
||||
|
||||
|
||||
handleEvent: function (aEvent) {
|
||||
switch (aEvent.type) {
|
||||
case "keypress":
|
||||
|
|
Загрузка…
Ссылка в новой задаче