Bug 1402493 - Don't prevent switching back to Reload for top level about: loads. r?gijs draft
authorJared Wein <jwein@mozilla.com>
Wed, 27 Sep 2017 17:35:09 -0400
changeset 671362 a692c8fab2292285d202fbb28fcf10f9b4e257e3
parent 671274 80bb4d5908235af57aea2da3f407b9fef5409fc2
child 733511 8d469bcf2dfd2a1668fb57a507661a914310a802
push id81931
push userbmo:jaws@mozilla.com
push dateWed, 27 Sep 2017 21:39:55 +0000
reviewersgijs
bugs1402493
milestone58.0a1
Bug 1402493 - Don't prevent switching back to Reload for top level about: loads. r?gijs In the steps to reproduce of this bug, we get see a load start for about:blank that is not top level. We then see a following load complete (STATE_STOP) that has aWebProgress.isTopLevel=true. This code is really here to prevent flickering from reload->stop->reload for about:home and other about: pages. I don't see any harm in being more agressive when switching back to Reload since that is the default state. MozReview-Commit-ID: 3LygnRLcbA9
browser/base/content/browser.js
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -5049,18 +5049,17 @@ var CombinedStopReload = {
       this.stopReloadContainer.setAttribute("animate", "true");
     } else {
       this.stopReloadContainer.removeAttribute("animate");
     }
     this.reload.setAttribute("displaystop", "true");
   },
 
   switchToReload(aRequest, aWebProgress) {
-    if (!this.ensureInitialized() || !this._shouldSwitch(aRequest, aWebProgress) ||
-        !this.reload.hasAttribute("displaystop")) {
+    if (!this.ensureInitialized() || !this.reload.hasAttribute("displaystop")) {
       return;
     }
 
     let shouldAnimate = aRequest instanceof Ci.nsIRequest &&
                         aWebProgress.isTopLevel &&
                         !aWebProgress.isLoadingDocument &&
                         !gBrowser.tabAnimationsInProgress &&
                         this._loadTimeExceedsMinimumForAnimation() &&