From f8e5e55a61b29029ebd2ceebc90112fb1e562e9d Mon Sep 17 00:00:00 2001 From: "mozilla.mano@sent.com" Date: Tue, 21 Aug 2007 22:02:29 -0700 Subject: [PATCH] Bug 83265 - Add a way to disable HTTP-EQUIV=refresh. patch from Mark Pilgrim , r=biesi,mano,mento. sr=bz. --- browser/base/content/tabbrowser.xml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/browser/base/content/tabbrowser.xml b/browser/base/content/tabbrowser.xml index 3dfc05db207..63e11dac284 100644 --- a/browser/base/content/tabbrowser.xml +++ b/browser/base/content/tabbrowser.xml @@ -29,6 +29,7 @@ - Seth Spitzer - Simon Bünzli - Michael Ventnor + - Mark Pilgrim - - Alternatively, the contents of this file may be used under the terms of - either the GNU General Public License Version 2 or later (the "GPL"), or @@ -286,6 +287,15 @@ this.mTotalProgress = aMaxTotalProgress ? aCurTotalProgress / aMaxTotalProgress : 0; }, + onProgressChange64 : function (aWebProgress, aRequest, + aCurSelfProgress, aMaxSelfProgress, + aCurTotalProgress, aMaxTotalProgress) + { + return this.onProgressChange(aWebProgress, aRequest, + aCurSelfProgress, aMaxSelfProgress, aCurTotalProgress, + aMaxTotalProgress); + }, + onStateChange : function(aWebProgress, aRequest, aStateFlags, aStatus) { if (!aRequest) @@ -431,9 +441,23 @@ } }, + onRefreshAttempted : function(aWebProgress, aURI, aDelay, aSameURI) + { + var allowRefresh = true; + for (var i = 0; i < this.mTabBrowser.mProgressListeners.length; i++) { + var p = this.mTabBrowser.mProgressListeners[i]; + if (p && "onRefreshAttempted" in p) { + if (!p.onRefreshAttempted(aWebProgress, aURI, aDelay, aSameURI)) + allowRefresh = false; + } + } + return allowRefresh; + }, + QueryInterface : function(aIID) { if (aIID.equals(Components.interfaces.nsIWebProgressListener) || + aIID.equals(Components.interfaces.nsIWebProgressListener2) || aIID.equals(Components.interfaces.nsISupportsWeakReference) || aIID.equals(Components.interfaces.nsISupports)) return this;