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:51:16 +0200
changeset 27363 1464e26a9aa50704a49b86917d197f027bebffed
parent 27360 bf49084c3c9e0acf4fe8426b1d50f2fc6f5a3a00
child 27364 581f90b8814be475cce1b4af06ae859b439bff01
push id1850
push userclokep@gmail.com
push dateWed, 08 Mar 2017 19:29:12 +0000
treeherdercomm-esr52@028df196b2d9 [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) {