Bug 1380150 - Prevent subresource loads from showing the progress indicator on the tab. r?gijs
MozReview-Commit-ID: JjZiHp2IXTC
--- a/browser/base/content/tabbrowser.xml
+++ b/browser/base/content/tabbrowser.xml
@@ -664,17 +664,17 @@
onProgressChange(aWebProgress, aRequest,
aCurSelfProgress, aMaxSelfProgress,
aCurTotalProgress, aMaxTotalProgress) {
this.mTotalProgress = aMaxTotalProgress ? aCurTotalProgress / aMaxTotalProgress : 0;
if (!this._shouldShowProgress(aRequest))
return;
- if (this.mTotalProgress)
+ if (this.mTotalProgress && aWebProgress && aWebProgress.isTopLevel)
this.mTab.setAttribute("progress", "true");
this._callProgressListeners("onProgressChange",
[aWebProgress, aRequest,
aCurSelfProgress, aMaxSelfProgress,
aCurTotalProgress, aMaxTotalProgress]);
},
@@ -751,17 +751,18 @@
this.mBrowser.urlbarChangeTracker.startedLoad();
}
delete this.mBrowser.initialPageLoadedFromURLBar;
// If the browser is loading it must not be crashed anymore
this.mTab.removeAttribute("crashed");
}
if (this._shouldShowProgress(aRequest)) {
- if (!(aStateFlags & nsIWebProgressListener.STATE_RESTORING)) {
+ if (!(aStateFlags & nsIWebProgressListener.STATE_RESTORING) &&
+ aWebProgress && aWebProgress.isTopLevel) {
this.mTab.setAttribute("busy", "true");
this._syncThrobberAnimations();
}
if (this.mTab.selected) {
this.mTabBrowser.mIsBusy = true;
}
}