From 0817bf1bde5c1461e6f655640cf66c17710d88f5 Mon Sep 17 00:00:00 2001 From: Mike Conley Date: Sun, 5 Mar 2017 13:27:35 -0500 Subject: [PATCH] Bug 1342927 - Async tab switcher updateDisplay() should only make the requested tab blank if it's in the loading state. r=billm MozReview-Commit-ID: Al6HwjxlETy --HG-- extra : rebase_source : 5504b826dfceb597ce2fd70df07ae2bc20881016 --- browser/base/content/tabbrowser.xml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/browser/base/content/tabbrowser.xml b/browser/base/content/tabbrowser.xml index d760d37a0a39..36fcf24f5281 100644 --- a/browser/base/content/tabbrowser.xml +++ b/browser/base/content/tabbrowser.xml @@ -3904,12 +3904,15 @@ // This function is called after all the main state changes to // make sure we display the right tab. updateDisplay() { - let shouldBeBlank = this.pendingTabChild.has( - this.requestedTab.linkedBrowser); + let requestedTabState = this.getTabState(this.requestedTab); + + let shouldBeBlank = + this.pendingTabChild.has(this.requestedTab.linkedBrowser) && + requestedTabState == this.STATE_LOADING; // Figure out which tab we actually want visible right now. let showTab = null; - if (this.getTabState(this.requestedTab) != this.STATE_LOADED && + if (requestedTabState != this.STATE_LOADED && this.lastVisibleTab && this.loadTimer && !shouldBeBlank) { // If we can't show the requestedTab, and lastVisibleTab is // available, show it. @@ -4315,6 +4318,8 @@ // of painting it right away. We'll paint a blank // tab instead. onTabChildNotReady(browser) { + this.assert(browser.isRemoteBrowser); + let tab = this.tabbrowser.getTabForBrowser(browser); this.assert(this.getTabState(tab) == this.STATE_LOADING);