зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1445298 - Remove global nsIWebNavigation constant from browser.js. r=Felipe
MozReview-Commit-ID: 27NdHKNnyJa --HG-- extra : rebase_source : 00706988f93942d7c4a5e7bd76fa92d3184c0cbe
This commit is contained in:
Родитель
b2c12ddb46
Коммит
6a87ef97bf
|
@ -222,8 +222,6 @@ XPCOMUtils.defineLazyGetter(this, "Win7Features", function() {
|
||||||
return null;
|
return null;
|
||||||
});
|
});
|
||||||
|
|
||||||
const nsIWebNavigation = Ci.nsIWebNavigation;
|
|
||||||
|
|
||||||
var gBrowser;
|
var gBrowser;
|
||||||
var gLastValidURLStr = "";
|
var gLastValidURLStr = "";
|
||||||
var gInPrintPreviewMode = false;
|
var gInPrintPreviewMode = false;
|
||||||
|
@ -1195,7 +1193,7 @@ var gBrowserInit = {
|
||||||
gBrowser.init();
|
gBrowser.init();
|
||||||
|
|
||||||
window.QueryInterface(Ci.nsIInterfaceRequestor)
|
window.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||||
.getInterface(nsIWebNavigation)
|
.getInterface(Ci.nsIWebNavigation)
|
||||||
.QueryInterface(Ci.nsIDocShellTreeItem).treeOwner
|
.QueryInterface(Ci.nsIDocShellTreeItem).treeOwner
|
||||||
.QueryInterface(Ci.nsIInterfaceRequestor)
|
.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||||
.getInterface(Ci.nsIXULWindow)
|
.getInterface(Ci.nsIXULWindow)
|
||||||
|
@ -2174,9 +2172,8 @@ function BrowserHandleShiftBackspace() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function BrowserStop() {
|
function BrowserStop() {
|
||||||
const stopFlags = nsIWebNavigation.STOP_ALL;
|
|
||||||
maybeRecordAbandonmentTelemetry(gBrowser.selectedTab, "stop");
|
maybeRecordAbandonmentTelemetry(gBrowser.selectedTab, "stop");
|
||||||
gBrowser.webNavigation.stop(stopFlags);
|
gBrowser.webNavigation.stop(Ci.nsIWebNavigation.STOP_ALL);
|
||||||
}
|
}
|
||||||
|
|
||||||
function BrowserReloadOrDuplicate(aEvent) {
|
function BrowserReloadOrDuplicate(aEvent) {
|
||||||
|
@ -2202,13 +2199,14 @@ function BrowserReload() {
|
||||||
// Bug 1167797: For view source, we always skip the cache
|
// Bug 1167797: For view source, we always skip the cache
|
||||||
return BrowserReloadSkipCache();
|
return BrowserReloadSkipCache();
|
||||||
}
|
}
|
||||||
const reloadFlags = nsIWebNavigation.LOAD_FLAGS_NONE;
|
const reloadFlags = Ci.nsIWebNavigation.LOAD_FLAGS_NONE;
|
||||||
BrowserReloadWithFlags(reloadFlags);
|
BrowserReloadWithFlags(reloadFlags);
|
||||||
}
|
}
|
||||||
|
|
||||||
function BrowserReloadSkipCache() {
|
function BrowserReloadSkipCache() {
|
||||||
// Bypass proxy and cache.
|
// Bypass proxy and cache.
|
||||||
const reloadFlags = nsIWebNavigation.LOAD_FLAGS_BYPASS_PROXY | nsIWebNavigation.LOAD_FLAGS_BYPASS_CACHE;
|
const reloadFlags = Ci.nsIWebNavigation.LOAD_FLAGS_BYPASS_PROXY |
|
||||||
|
Ci.nsIWebNavigation.LOAD_FLAGS_BYPASS_CACHE;
|
||||||
BrowserReloadWithFlags(reloadFlags);
|
BrowserReloadWithFlags(reloadFlags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3153,7 +3151,7 @@ var BrowserOnClick = {
|
||||||
// but add a notify bar as a reminder, so that they don't lose
|
// but add a notify bar as a reminder, so that they don't lose
|
||||||
// track after, e.g., tab switching.
|
// track after, e.g., tab switching.
|
||||||
gBrowser.loadURIWithFlags(gBrowser.currentURI.spec,
|
gBrowser.loadURIWithFlags(gBrowser.currentURI.spec,
|
||||||
nsIWebNavigation.LOAD_FLAGS_BYPASS_CLASSIFIER,
|
Ci.nsIWebNavigation.LOAD_FLAGS_BYPASS_CLASSIFIER,
|
||||||
null, null, null);
|
null, null, null);
|
||||||
|
|
||||||
Services.perms.add(gBrowser.currentURI, "safe-browsing",
|
Services.perms.add(gBrowser.currentURI, "safe-browsing",
|
||||||
|
@ -5321,11 +5319,11 @@ nsBrowserAccess.prototype = {
|
||||||
Ci.nsIWebNavigation.LOAD_FLAGS_FROM_EXTERNAL :
|
Ci.nsIWebNavigation.LOAD_FLAGS_FROM_EXTERNAL :
|
||||||
Ci.nsIWebNavigation.LOAD_FLAGS_NONE;
|
Ci.nsIWebNavigation.LOAD_FLAGS_NONE;
|
||||||
gBrowser.loadURIWithFlags(aURI.spec, {
|
gBrowser.loadURIWithFlags(aURI.spec, {
|
||||||
aTriggeringPrincipal,
|
aTriggeringPrincipal,
|
||||||
flags: loadflags,
|
flags: loadflags,
|
||||||
referrerURI: referrer,
|
referrerURI: referrer,
|
||||||
referrerPolicy,
|
referrerPolicy,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (!Services.prefs.getBoolPref("browser.tabs.loadDivertedInBackground"))
|
if (!Services.prefs.getBoolPref("browser.tabs.loadDivertedInBackground"))
|
||||||
window.focus();
|
window.focus();
|
||||||
|
@ -6205,7 +6203,7 @@ function BrowserSetForcedCharacterSet(aCharset) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function BrowserCharsetReload() {
|
function BrowserCharsetReload() {
|
||||||
BrowserReloadWithFlags(nsIWebNavigation.LOAD_FLAGS_CHARSET_CHANGE);
|
BrowserReloadWithFlags(Ci.nsIWebNavigation.LOAD_FLAGS_CHARSET_CHANGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
function UpdateCurrentCharset(target) {
|
function UpdateCurrentCharset(target) {
|
||||||
|
|
|
@ -61,7 +61,7 @@ function loadWebPanel(aURI) {
|
||||||
var panelBrowser = getPanelBrowser();
|
var panelBrowser = getPanelBrowser();
|
||||||
if (gLoadFired) {
|
if (gLoadFired) {
|
||||||
panelBrowser.webNavigation
|
panelBrowser.webNavigation
|
||||||
.loadURI(aURI, nsIWebNavigation.LOAD_FLAGS_NONE,
|
.loadURI(aURI, Ci.nsIWebNavigation.LOAD_FLAGS_NONE,
|
||||||
null, null, null);
|
null, null, null);
|
||||||
}
|
}
|
||||||
panelBrowser.setAttribute("cachedurl", aURI);
|
panelBrowser.setAttribute("cachedurl", aURI);
|
||||||
|
@ -75,7 +75,7 @@ function load() {
|
||||||
var cachedurl = panelBrowser.getAttribute("cachedurl");
|
var cachedurl = panelBrowser.getAttribute("cachedurl");
|
||||||
if (cachedurl) {
|
if (cachedurl) {
|
||||||
panelBrowser.webNavigation
|
panelBrowser.webNavigation
|
||||||
.loadURI(cachedurl, nsIWebNavigation.LOAD_FLAGS_NONE, null,
|
.loadURI(cachedurl, Ci.nsIWebNavigation.LOAD_FLAGS_NONE, null,
|
||||||
null, null);
|
null, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -87,12 +87,12 @@ function unload() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function PanelBrowserStop() {
|
function PanelBrowserStop() {
|
||||||
getPanelBrowser().webNavigation.stop(nsIWebNavigation.STOP_ALL);
|
getPanelBrowser().webNavigation.stop(Ci.nsIWebNavigation.STOP_ALL);
|
||||||
}
|
}
|
||||||
|
|
||||||
function PanelBrowserReload() {
|
function PanelBrowserReload() {
|
||||||
getPanelBrowser().webNavigation
|
getPanelBrowser().webNavigation
|
||||||
.sessionHistory
|
.sessionHistory
|
||||||
.QueryInterface(nsIWebNavigation)
|
.QueryInterface(Ci.nsIWebNavigation)
|
||||||
.reload(nsIWebNavigation.LOAD_FLAGS_NONE);
|
.reload(Ci.nsIWebNavigation.LOAD_FLAGS_NONE);
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче