Bug 1362103 - Suppress animation on first window opening. r?florian draft
authorMike Conley <mconley@mozilla.com>
Thu, 04 May 2017 12:42:27 -0400
changeset 577920 01a01d4446f7925013ea84d8a4837be0a0e437ed
parent 577862 0f4df67c5f162e00d6f52825badf468aefbfba19
child 628626 4ba41548ea6c48ddf73dcf9cfcf1e8c0e9eaf959
push id58826
push usermconley@mozilla.com
push dateMon, 15 May 2017 16:28:46 +0000
reviewersflorian
bugs1362103
milestone55.0a1
Bug 1362103 - Suppress animation on first window opening. r?florian Enabled by default behind the browser.suppress_first_window_animation pref. MozReview-Commit-ID: 4mzy4Qif0LX
browser/app/profile/firefox.js
browser/components/nsBrowserContentHandler.js
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -1646,8 +1646,10 @@ pref("extensions.formautofill.loglevel",
 // Whether or not to restore a session with lazy-browser tabs.
 pref("browser.sessionstore.restore_tabs_lazily", true);
 
 // Enable safebrowsing v4 tables (suffixed by "-proto") update.
 #ifdef NIGHTLY_BUILD
 pref("urlclassifier.malwareTable", "goog-malware-shavar,goog-unwanted-shavar,goog-malware-proto,goog-unwanted-proto,test-malware-simple,test-unwanted-simple");
 pref("urlclassifier.phishTable", "goog-phish-shavar,goog-phish-proto,test-phish-simple");
 #endif
+
+pref("browser.suppress_first_window_animation", true);
--- a/browser/components/nsBrowserContentHandler.js
+++ b/browser/components/nsBrowserContentHandler.js
@@ -571,17 +571,22 @@ nsBrowserContentHandler.prototype = {
         if (height)
           this.mFeatures += ",height=" + height;
       } catch (e) {
       }
 
       // The global PB Service consumes this flag, so only eat it in per-window
       // PB builds.
       if (PrivateBrowsingUtils.isInTemporaryAutoStartMode) {
-        this.mFeatures = ",private";
+        this.mFeatures += ",private";
+      }
+
+      if (Services.prefs.getBoolPref("browser.suppress_first_window_animation") &&
+          !Services.wm.getMostRecentWindow("navigator:browser")) {
+        this.mFeatures += ",suppressanimation";
       }
     }
 
     return this.mFeatures;
   },
 
   /* nsIContentHandler */