mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-01 17:23:59 +00:00
Bug 998267 - Don't always show the throbber when opening new tabs in e10s r=billm
This commit is contained in:
parent
d86b88913c
commit
0abde01963
@ -580,9 +580,6 @@
|
||||
if (this.mBlank)
|
||||
return false;
|
||||
|
||||
if (gMultiProcessBrowser)
|
||||
return true;
|
||||
|
||||
// Don't show progress indicators in tabs for about: URIs
|
||||
// pointing to local resources.
|
||||
try {
|
||||
|
@ -40,17 +40,18 @@ let WebProgressListener = {
|
||||
webProgress.addProgressListener(this, Ci.nsIWebProgress.NOTIFY_ALL);
|
||||
},
|
||||
|
||||
_requestSpec: function (aRequest) {
|
||||
_requestSpec: function (aRequest, aPropertyName) {
|
||||
if (!aRequest || !(aRequest instanceof Ci.nsIChannel))
|
||||
return null;
|
||||
return aRequest.QueryInterface(Ci.nsIChannel).URI.spec;
|
||||
return aRequest.QueryInterface(Ci.nsIChannel)[aPropertyName].spec;
|
||||
},
|
||||
|
||||
_setupJSON: function setupJSON(aWebProgress, aRequest) {
|
||||
return {
|
||||
isTopLevel: aWebProgress.isTopLevel,
|
||||
isLoadingDocument: aWebProgress.isLoadingDocument,
|
||||
requestURI: this._requestSpec(aRequest),
|
||||
requestURI: this._requestSpec(aRequest, "URI"),
|
||||
originalRequestURI: this._requestSpec(aRequest, "originalURI"),
|
||||
loadType: aWebProgress.loadType,
|
||||
documentContentType: content.document && content.document.contentType
|
||||
};
|
||||
|
@ -17,15 +17,17 @@ function newURI(spec)
|
||||
.newURI(spec, null, null);
|
||||
}
|
||||
|
||||
function RemoteWebProgressRequest(spec)
|
||||
function RemoteWebProgressRequest(spec, originalSpec)
|
||||
{
|
||||
this.uri = newURI(spec);
|
||||
this._uri = newURI(spec);
|
||||
this._originalURI = newURI(originalSpec);
|
||||
}
|
||||
|
||||
RemoteWebProgressRequest.prototype = {
|
||||
QueryInterface : XPCOMUtils.generateQI([Ci.nsIChannel]),
|
||||
|
||||
get URI() { return this.uri.clone(); }
|
||||
get URI() { return this._uri.clone(); },
|
||||
get originalURI() { return this._originalURI.clone(); }
|
||||
};
|
||||
|
||||
function RemoteWebProgress(aManager, aIsTopLevel) {
|
||||
@ -144,8 +146,11 @@ RemoteWebProgressManager.prototype = {
|
||||
: new RemoteWebProgress(this, false);
|
||||
|
||||
// The WebProgressRequest object however is always dynamic.
|
||||
let request = json.requestURI ? new RemoteWebProgressRequest(json.requestURI)
|
||||
: null;
|
||||
let request = null;
|
||||
if (json.requestURI) {
|
||||
request = new RemoteWebProgressRequest(json.requestURI,
|
||||
json.originalRequestURI);
|
||||
}
|
||||
|
||||
// Update the actual WebProgress fields.
|
||||
webProgress._isLoadingDocument = json.isLoadingDocument;
|
||||
|
Loading…
Reference in New Issue
Block a user