зеркало из https://github.com/mozilla/pjs.git
More 100706 fun. r/sr=jst,jag
This commit is contained in:
Родитель
4fff55e04d
Коммит
f0ea19744a
|
@ -404,9 +404,7 @@ function Shutdown()
|
||||||
browser.boxObject.removeProperty("listenerkungfu");
|
browser.boxObject.removeProperty("listenerkungfu");
|
||||||
|
|
||||||
try {
|
try {
|
||||||
var interfaceRequestor = browser.docShell.QueryInterface(Components.interfaces.nsIInterfaceRequestor);
|
getBrowser().removeProgressListener(window.XULBrowserWindow);
|
||||||
var webProgress = interfaceRequestor.getInterface(Components.interfaces.nsIWebProgress);
|
|
||||||
webProgress.removeProgressListener(window.XULBrowserWindow);
|
|
||||||
} catch (ex) {
|
} catch (ex) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -147,10 +147,7 @@ nsBrowserStatusHandler.prototype =
|
||||||
},
|
},
|
||||||
|
|
||||||
onStateChange : function(aWebProgress, aRequest, aStateFlags, aStatus)
|
onStateChange : function(aWebProgress, aRequest, aStateFlags, aStatus)
|
||||||
{
|
{
|
||||||
if (!aRequest)
|
|
||||||
return;
|
|
||||||
|
|
||||||
//ignore local/resource:/chrome: files
|
//ignore local/resource:/chrome: files
|
||||||
if (aStatus == NS_NET_STATUS_READ_FROM || aStatus == NS_NET_STATUS_WROTE_TO)
|
if (aStatus == NS_NET_STATUS_READ_FROM || aStatus == NS_NET_STATUS_WROTE_TO)
|
||||||
return;
|
return;
|
||||||
|
@ -164,7 +161,7 @@ nsBrowserStatusHandler.prototype =
|
||||||
this.startTime = (new Date()).getTime();
|
this.startTime = (new Date()).getTime();
|
||||||
|
|
||||||
domWindow = aWebProgress.DOMWindow;
|
domWindow = aWebProgress.DOMWindow;
|
||||||
if (domWindow == _content)
|
if (aRequest && domWindow == _content)
|
||||||
this.startDocumentLoad(aRequest);
|
this.startDocumentLoad(aRequest);
|
||||||
|
|
||||||
// Turn progress meter on.
|
// Turn progress meter on.
|
||||||
|
@ -194,19 +191,21 @@ nsBrowserStatusHandler.prototype =
|
||||||
}
|
}
|
||||||
if (aStateFlags & nsIWebProgressListener.STATE_IS_NETWORK) {
|
if (aStateFlags & nsIWebProgressListener.STATE_IS_NETWORK) {
|
||||||
domWindow = aWebProgress.DOMWindow;
|
domWindow = aWebProgress.DOMWindow;
|
||||||
if (domWindow == domWindow.top)
|
if (aRequest) {
|
||||||
this.endDocumentLoad(aRequest, aStatus);
|
if (domWindow == domWindow.top)
|
||||||
|
this.endDocumentLoad(aRequest, aStatus);
|
||||||
|
|
||||||
var location = aRequest.QueryInterface(nsIChannel).URI.spec;
|
var location = aRequest.QueryInterface(nsIChannel).URI.spec;
|
||||||
var msg = "";
|
var msg = "";
|
||||||
if (location != "about:blank") {
|
if (location != "about:blank") {
|
||||||
// Record page loading time.
|
// Record page loading time.
|
||||||
var elapsed = ((new Date()).getTime() - this.startTime) / 1000;
|
var elapsed = ((new Date()).getTime() - this.startTime) / 1000;
|
||||||
msg = gNavigatorBundle.getString("nv_done");
|
msg = gNavigatorBundle.getString("nv_done");
|
||||||
msg = msg.replace(/%elapsed%/, elapsed);
|
msg = msg.replace(/%elapsed%/, elapsed);
|
||||||
|
}
|
||||||
|
this.status = "";
|
||||||
|
this.setDefaultStatus(msg);
|
||||||
}
|
}
|
||||||
this.status = "";
|
|
||||||
this.setDefaultStatus(msg);
|
|
||||||
|
|
||||||
// Turn progress meter off.
|
// Turn progress meter off.
|
||||||
this.statusMeter.mode = "normal";
|
this.statusMeter.mode = "normal";
|
||||||
|
|
Загрузка…
Ссылка в новой задаче