Bug 1336230 - If the current window is maximized if the user opens a new window, skip the opening animation. r?felipe
MozReview-Commit-ID: JHmG9nclcGC
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -4114,16 +4114,23 @@ function OpenBrowserWindow(options) {
}
if (options && options.remote) {
extraFeatures += ",remote";
} else if (options && options.remote === false) {
extraFeatures += ",non-remote";
}
+ // If the window is maximized, we want to skip the animation, since we're
+ // going to be taking up most of the screen anyways, and we want to optimize
+ // for showing the user a useful window as soon as possible.
+ if (window.windowState == window.STATE_MAXIMIZED) {
+ extraFeatures += ",suppressanimation";
+ }
+
// if and only if the current window is a browser window and it has a document with a character
// set, then extract the current charset menu setting from the current document and use it to
// initialize the new browser window...
var win;
if (window && (wintype == "navigator:browser") && window.content && window.content.document) {
var DocCharset = window.content.document.characterSet;
charsetArg = "charset=" + DocCharset;