Bug 1394060 - Only show the burst animation for page loads that are successful. Loads that are cancelled should not show the burst. r?dao draft
authorJared Wein <jwein@mozilla.com>
Tue, 29 Aug 2017 18:53:37 -0400
changeset 655364 147a00c641c1a76d57c88df0b1a70d99a7549d22
parent 654592 1b4c59eef820b46eb0037aca68f83a15088db45f
child 728815 fb9446d3eef6309707268dcf3616e93d87940a2b
push id76853
push userbmo:jaws@mozilla.com
push dateTue, 29 Aug 2017 22:53:55 +0000
reviewersdao
bugs1394060
milestone57.0a1
Bug 1394060 - Only show the burst animation for page loads that are successful. Loads that are cancelled should not show the burst. r?dao MozReview-Commit-ID: A9Y98WHYBY4
browser/base/content/tabbrowser.xml
--- a/browser/base/content/tabbrowser.xml
+++ b/browser/base/content/tabbrowser.xml
@@ -724,16 +724,17 @@
                          aStateFlags & nsIWebProgressListener.STATE_IS_NETWORK) {
 
                 if (this.mTab.hasAttribute("busy")) {
                   this.mTab.removeAttribute("busy");
 
                   // Only animate the "burst" indicating the page has loaded if
                   // the top-level page is the one that finished loading.
                   if (aWebProgress.isTopLevel && !aWebProgress.isLoadingDocument &&
+                      Components.isSuccessCode(aStatus) &&
                       !this.mTabBrowser.tabAnimationsInProgress &&
                       Services.prefs.getBoolPref("toolkit.cosmeticAnimations.enabled")) {
                     this.mTab.setAttribute("bursting", "true");
                   }
 
                   this.mTabBrowser._tabAttrModified(this.mTab, ["busy"]);
                   if (!this.mTab.selected)
                     this.mTab.setAttribute("unread", "true");