Bug 1397426 - Activate docShells immediately for imageDocument pages when switching tabs with warming enabled. r?billm
This is a workaround for
Bug 1418099.
MozReview-Commit-ID: 9cgAj1zMJr2
--- a/browser/base/content/tabbrowser.xml
+++ b/browser/base/content/tabbrowser.xml
@@ -4409,17 +4409,22 @@
setTabState(tab, state) {
this.setTabStateNoAction(tab, state);
let browser = tab.linkedBrowser;
let {tabParent} = browser.frameLoader;
if (state == this.STATE_LOADING) {
this.assert(!this.minimizedOrFullyOccluded);
- if (!this.tabbrowser.tabWarmingEnabled) {
+ // Bug 1418099 - if we don't activate the docShell here,
+ // we see a flash because an inactive docShell (even if
+ // the tab is warmed up) doesn't decode images. This is
+ // a workaround for that.
+ if (!this.tabbrowser.tabWarmingEnabled ||
+ browser.imageDocument) {
browser.docShellIsActive = true;
}
if (tabParent) {
tabParent.renderLayers(true);
} else {
this.onLayersReady(browser);
}