Bug 1380150 - Prevent subresource loads from showing the progress indicator on the tab. r=Gijs
☠☠ backed out by ecd75d0e0a2f ☠ ☠
authorJared Wein <jwein@mozilla.com>
Fri, 08 Sep 2017 14:59:22 -0400
changeset 429460 440b703da884ff5eaa805314982c2003febf5349
parent 429445 73ad672a411f900715c6a1fb49c8ffe133f627a2
child 429461 ecd75d0e0a2f5215aa4c3a08502e4434192b4ab3
push id7761
push userjlund@mozilla.com
push dateFri, 15 Sep 2017 00:19:52 +0000
treeherdermozilla-beta@c38455951db4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersGijs
bugs1380150
milestone57.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1380150 - Prevent subresource loads from showing the progress indicator on the tab. r=Gijs MozReview-Commit-ID: JjZiHp2IXTC
browser/base/content/tabbrowser.xml
--- 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.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.isTopLevel) {
                     this.mTab.setAttribute("busy", "true");
                     this._syncThrobberAnimations();
                   }
 
                   if (this.mTab.selected) {
                     this.mTabBrowser.mIsBusy = true;
                   }
                 }