Bug 1336230 - Rename macsuppressanimation and CHROME_MAC_SUPPRESS_ANIMATION to be platform agnostic. r=jimm

MozReview-Commit-ID: HWyrm1lVwdY

--HG--
extra : rebase_source : ed8d71d9187a8afff0d3ca65641b335337e20f9d
This commit is contained in:
Mike Conley 2017-02-03 16:04:33 -05:00
parent 10665c1427
commit 170479eb55
5 changed files with 10 additions and 10 deletions

View File

@ -4032,7 +4032,7 @@ var SessionStoreInternal = {
argString.data = "";
// Build feature string
let features = "chrome,dialog=no,macsuppressanimation,all";
let features = "chrome,dialog=no,suppressanimation,all";
let winState = aState.windows[0];
WINDOW_ATTRIBUTES.forEach(function(aFeature) {
// Use !isNaN as an easy way to ignore sizemode and check for numbers

View File

@ -83,9 +83,9 @@ interface nsIWebBrowserChrome : nsISupports
// Whether this window should use remote (out-of-process) tabs.
const unsigned long CHROME_REMOTE_WINDOW = 0x00100000;
// Prevents new window animations on Mac OS X Lion. Ignored on other
// platforms.
const unsigned long CHROME_MAC_SUPPRESS_ANIMATION = 0x01000000;
// Prevents new window animations on MacOS and Windows. Currently
// ignored for Linux.
const unsigned long CHROME_SUPPRESS_ANIMATION = 0x01000000;
const unsigned long CHROME_WINDOW_RAISED = 0x02000000;
const unsigned long CHROME_WINDOW_LOWERED = 0x04000000;

View File

@ -1928,8 +1928,8 @@ nsWindowWatcher::CalculateChromeFlagsForParent(mozIDOMWindowProxy* aParent,
chromeFlags |= nsIWebBrowserChrome::CHROME_WINDOW_RAISED;
}
chromeFlags |= WinHasOption(aFeatures, "macsuppressanimation", 0, nullptr) ?
nsIWebBrowserChrome::CHROME_MAC_SUPPRESS_ANIMATION : 0;
chromeFlags |= WinHasOption(aFeatures, "suppressanimation", 0, nullptr) ?
nsIWebBrowserChrome::CHROME_SUPPRESS_ANIMATION : 0;
chromeFlags |= WinHasOption(aFeatures, "chrome", 0, nullptr) ?
nsIWebBrowserChrome::CHROME_OPENAS_CHROME : 0;

View File

@ -88,7 +88,7 @@ const DISALLOWED = {
flag: Ci.nsIWebBrowserChrome.CHROME_WINDOW_RAISED,
defaults_to: false,
},
"macsuppressanimation": {
"suppressanimation": {
flag: Ci.nsIWebBrowserChrome.CHROME_MAC_SUPPRESS_ANIMATION,
defaults_to: false,
},

View File

@ -185,7 +185,7 @@ nsAppShellService::DestroyHiddenWindow()
*/
NS_IMETHODIMP
nsAppShellService::CreateTopLevelWindow(nsIXULWindow *aParent,
nsIURI *aUrl,
nsIURI *aUrl,
uint32_t aChromeMask,
int32_t aInitialWidth,
int32_t aInitialHeight,
@ -658,7 +658,7 @@ nsAppShellService::JustCreateTopWindow(nsIXULWindow *aParent,
if (aChromeMask & nsIWebBrowserChrome::CHROME_WINDOW_POPUP)
widgetInitData.mWindowType = eWindowType_popup;
if (aChromeMask & nsIWebBrowserChrome::CHROME_MAC_SUPPRESS_ANIMATION)
if (aChromeMask & nsIWebBrowserChrome::CHROME_SUPPRESS_ANIMATION)
widgetInitData.mIsAnimationSuppressed = true;
#ifdef XP_MACOSX
@ -710,7 +710,7 @@ nsAppShellService::JustCreateTopWindow(nsIXULWindow *aParent,
// but anyone can explicitly ask for a minimize button
if (aChromeMask & nsIWebBrowserChrome::CHROME_WINDOW_MIN) {
widgetInitData.mBorderStyle = static_cast<enum nsBorderStyle>(widgetInitData.mBorderStyle | eBorderStyle_minimize);
}
}
}
if (aInitialWidth == nsIAppShellService::SIZE_TO_CONTENT ||