Bug 1443315 - Make preloaded about:newtab's layers always rendered so that we avoid the flash when opening new tabs. r?florian draft
authorMike Conley <mconley@mozilla.com>
Mon, 05 Mar 2018 17:03:09 -0500
changeset 763888 6ef922f441e93dc3cc3e444b4ead357700144ca5
parent 763748 a4ef1082c51d5b4508882c22487f6c8de5b35e2a
child 763889 209367441645ac11e1be88fdc0e1d5f117bbf414
child 763890 88273e2ec831156a7cf5e472ece6d3cd35423ad0
child 763894 c678efc1f108318186ba2367f7cc7b6bc2b1a526
child 763895 32b48514a6ce1db07f310bedd33cb5bb6137661e
push id101585
push usermconley@mozilla.com
push dateTue, 06 Mar 2018 20:34:39 +0000
reviewersflorian
bugs1443315
milestone60.0a1
Bug 1443315 - Make preloaded about:newtab's layers always rendered so that we avoid the flash when opening new tabs. r?florian MozReview-Commit-ID: I0MvCnzskhB
browser/base/content/tabbrowser.js
--- a/browser/base/content/tabbrowser.js
+++ b/browser/base/content/tabbrowser.js
@@ -1807,16 +1807,18 @@ class TabBrowser {
       // For remote browsers, we need to make sure that the webProgress is
       // instantiated, otherwise the parent won't get informed about the state
       // of the preloaded browser until it gets attached to a tab.
       browser.webProgress;
     }
 
     browser.loadURI(BROWSER_NEW_TAB_URL);
     browser.docShellIsActive = false;
+    browser.renderLayers = true;
+    browser._urlbarFocused = true;
 
     // Make sure the preloaded browser is loaded with desired zoom level
     let tabURI = Services.io.newURI(BROWSER_NEW_TAB_URL);
     FullZoom.onLocationChange(tabURI, false, browser);
   }
 
   _createBrowser(aParams) {
     // Supported parameters: