Bug 1296838 - Show loading icon even if previous tab had a fav icon. r=Ratty a=Ratty
authorFrank-Rainer Grahl <frgrahl@gmx.net>
Fri, 02 Sep 2016 16:54:35 +0200
changeset 31313 51994306d373a802dfb426ab9f83596b3f7b4d1e
parent 31312 8c1e5a12bdf90ccb9339e2698e1c20b3bf07ea8d
child 31314 2062c13508a36a5c59d7b4b42a80d2772f654fa3
push id1
push userclokep@gmail.com
push dateMon, 07 May 2018 22:45:56 +0000
treeherdercomm-esr60@57eacde5ef40 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersRatty, Ratty
bugs1296838
Bug 1296838 - Show loading icon even if previous tab had a fav icon. r=Ratty a=Ratty
suite/browser/tabbrowser.xml
--- a/suite/browser/tabbrowser.xml
+++ b/suite/browser/tabbrowser.xml
@@ -538,19 +538,24 @@
                   // If the browser is loading it must not be crashed anymore.
                   this.mTab.removeAttribute("crashed");
                 }
 
                 if (this._shouldShowProgress(aRequest)) {
                   if (!(aStateFlags & nsIWebProgressListener.STATE_RESTORING)) {
                     this.mTab.setAttribute("busy", "true");
 
-                    if (aWebProgress.isTopLevel &&
-                        !(aWebProgress.loadType & Components.interfaces.nsIDocShell.LOAD_CMD_RELOAD))
-                      this.mTabBrowser.setTabTitleLoading(this.mTab);
+                    // Do the following only for the top frame not any subframes.
+                    if (aWebProgress.isTopLevel) {
+                      // Remove favicon. This shows busy and progress indicators even during a reload.
+                      this.mTab.removeAttribute("image");
+
+                      if (!(aWebProgress.loadType & Components.interfaces.nsIDocShell.LOAD_CMD_RELOAD))
+                        this.mTabBrowser.setTabTitleLoading(this.mTab);
+                    }
                   }
 
                   if (this.mTab.selected)
                     this.mTabBrowser.mIsBusy = true;
                 }
               }
               else if (aStateFlags & nsIWebProgressListener.STATE_STOP &&
                        aStateFlags & nsIWebProgressListener.STATE_IS_NETWORK) {