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
--- 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 */