mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-22 18:32:00 +00:00
Bustage fix from the badly applied patch from bug 463387
This commit is contained in:
parent
4d902f2730
commit
ef32c8f8ae
@ -4040,73 +4040,6 @@ var XULBrowserWindow = {
|
||||
this.updateStatusField();
|
||||
},
|
||||
|
||||
onSecurityChange: function (aBrowser, aWebProgress, aRequest, aState) {
|
||||
}
|
||||
}
|
||||
|
||||
var TabsProgressListener = {
|
||||
onProgressChange: function (aBrowser, aWebProgress, aRequest,
|
||||
aCurSelfProgress, aMaxSelfProgress,
|
||||
aCurTotalProgress, aMaxTotalProgress) {
|
||||
},
|
||||
|
||||
onStateChange: function (aBrowser, aWebProgress, aRequest, aStateFlags, aStatus) {
|
||||
},
|
||||
|
||||
onLocationChange: function (aBrowser, aWebProgress, aRequest, aLocationURI) {
|
||||
},
|
||||
|
||||
onStatusChange: function (aBrowser, aWebProgress, aRequest, aStatus, aMessage) {
|
||||
},
|
||||
|
||||
onRefreshAttempted: function (aBrowser, aWebProgress, aURI, aDelay, aSameURI) {
|
||||
if (gPrefService.getBoolPref("accessibility.blockautorefresh")) {
|
||||
let brandBundle = document.getElementById("bundle_brand");
|
||||
let brandShortName = brandBundle.getString("brandShortName");
|
||||
let refreshButtonText =
|
||||
gNavigatorBundle.getString("refreshBlocked.goButton");
|
||||
let refreshButtonAccesskey =
|
||||
gNavigatorBundle.getString("refreshBlocked.goButton.accesskey");
|
||||
let message =
|
||||
gNavigatorBundle.getFormattedString(aSameURI ? "refreshBlocked.refreshLabel"
|
||||
: "refreshBlocked.redirectLabel",
|
||||
[brandShortName]);
|
||||
let docShell = aWebProgress.DOMWindow
|
||||
.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||
.getInterface(Ci.nsIWebNavigation)
|
||||
.QueryInterface(Ci.nsIDocShell);
|
||||
let notificationBox = gBrowser.getNotificationBox(aBrowser);
|
||||
let notification = notificationBox.getNotificationWithValue("refresh-blocked");
|
||||
if (notification) {
|
||||
notification.label = message;
|
||||
notification.refreshURI = aURI;
|
||||
notification.delay = aDelay;
|
||||
notification.docShell = docShell;
|
||||
} else {
|
||||
let buttons = [{
|
||||
label: refreshButtonText,
|
||||
accessKey: refreshButtonAccesskey,
|
||||
callback: function (aNotification, aButton) {
|
||||
var refreshURI = aNotification.docShell
|
||||
.QueryInterface(Ci.nsIRefreshURI);
|
||||
refreshURI.forceRefreshURI(aNotification.refreshURI,
|
||||
aNotification.delay, true);
|
||||
}
|
||||
}];
|
||||
notification =
|
||||
notificationBox.appendNotification(message, "refresh-blocked",
|
||||
"chrome://browser/skin/Info.png",
|
||||
notificationBox.PRIORITY_INFO_MEDIUM,
|
||||
buttons);
|
||||
notification.refreshURI = aURI;
|
||||
notification.delay = aDelay;
|
||||
notification.docShell = docShell;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
|
||||
// Properties used to cache security state used to update the UI
|
||||
_state: null,
|
||||
_host: undefined,
|
||||
@ -4264,6 +4197,73 @@ var TabsProgressListener = {
|
||||
}
|
||||
}
|
||||
|
||||
var TabsProgressListener = {
|
||||
onProgressChange: function (aBrowser, aWebProgress, aRequest,
|
||||
aCurSelfProgress, aMaxSelfProgress,
|
||||
aCurTotalProgress, aMaxTotalProgress) {
|
||||
},
|
||||
|
||||
onStateChange: function (aBrowser, aWebProgress, aRequest, aStateFlags, aStatus) {
|
||||
},
|
||||
|
||||
onLocationChange: function (aBrowser, aWebProgress, aRequest, aLocationURI) {
|
||||
},
|
||||
|
||||
onStatusChange: function (aBrowser, aWebProgress, aRequest, aStatus, aMessage) {
|
||||
},
|
||||
|
||||
onRefreshAttempted: function (aBrowser, aWebProgress, aURI, aDelay, aSameURI) {
|
||||
if (gPrefService.getBoolPref("accessibility.blockautorefresh")) {
|
||||
let brandBundle = document.getElementById("bundle_brand");
|
||||
let brandShortName = brandBundle.getString("brandShortName");
|
||||
let refreshButtonText =
|
||||
gNavigatorBundle.getString("refreshBlocked.goButton");
|
||||
let refreshButtonAccesskey =
|
||||
gNavigatorBundle.getString("refreshBlocked.goButton.accesskey");
|
||||
let message =
|
||||
gNavigatorBundle.getFormattedString(aSameURI ? "refreshBlocked.refreshLabel"
|
||||
: "refreshBlocked.redirectLabel",
|
||||
[brandShortName]);
|
||||
let docShell = aWebProgress.DOMWindow
|
||||
.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||
.getInterface(Ci.nsIWebNavigation)
|
||||
.QueryInterface(Ci.nsIDocShell);
|
||||
let notificationBox = gBrowser.getNotificationBox(aBrowser);
|
||||
let notification = notificationBox.getNotificationWithValue("refresh-blocked");
|
||||
if (notification) {
|
||||
notification.label = message;
|
||||
notification.refreshURI = aURI;
|
||||
notification.delay = aDelay;
|
||||
notification.docShell = docShell;
|
||||
} else {
|
||||
let buttons = [{
|
||||
label: refreshButtonText,
|
||||
accessKey: refreshButtonAccesskey,
|
||||
callback: function (aNotification, aButton) {
|
||||
var refreshURI = aNotification.docShell
|
||||
.QueryInterface(Ci.nsIRefreshURI);
|
||||
refreshURI.forceRefreshURI(aNotification.refreshURI,
|
||||
aNotification.delay, true);
|
||||
}
|
||||
}];
|
||||
notification =
|
||||
notificationBox.appendNotification(message, "refresh-blocked",
|
||||
"chrome://browser/skin/Info.png",
|
||||
notificationBox.PRIORITY_INFO_MEDIUM,
|
||||
buttons);
|
||||
notification.refreshURI = aURI;
|
||||
notification.delay = aDelay;
|
||||
notification.docShell = docShell;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
|
||||
onSecurityChange: function (aBrowser, aWebProgress, aRequest, aState) {
|
||||
}
|
||||
}
|
||||
|
||||
function nsBrowserAccess()
|
||||
{
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user