From 1ed1649bb71bc8fccb8b7c86e56bbfaf6b052ef8 Mon Sep 17 00:00:00 2001 From: Andrea Marchesini Date: Wed, 7 Dec 2016 16:20:08 -1000 Subject: [PATCH] Bug 1322440 - Get rid of contextFlags in nsIWindowCreator2, r=smaug --- .../components/windowwatcher/nsWindowWatcher.cpp | 3 +-- embedding/nsIWindowCreator2.idl | 6 ------ toolkit/components/startup/nsAppStartup.cpp | 4 +--- xpfe/appshell/nsIXULWindow.idl | 5 ----- xpfe/appshell/nsXULWindow.cpp | 14 -------------- xpfe/appshell/nsXULWindow.h | 1 - 6 files changed, 2 insertions(+), 31 deletions(-) diff --git a/embedding/components/windowwatcher/nsWindowWatcher.cpp b/embedding/components/windowwatcher/nsWindowWatcher.cpp index eac851b1b76a..f81afe0629e2 100644 --- a/embedding/components/windowwatcher/nsWindowWatcher.cpp +++ b/embedding/components/windowwatcher/nsWindowWatcher.cpp @@ -504,8 +504,7 @@ nsWindowWatcher::CreateChromeWindow(const nsACString& aFeatures, nsCOMPtr newWindowChrome; nsresult rv = windowCreator2->CreateChromeWindow2(aParentChrome, aChromeFlags, - 0 /* contextFlag */, aOpeningTabParent, - aOpener, &cancel, + aOpeningTabParent, aOpener, &cancel, getter_AddRefs(newWindowChrome)); if (NS_SUCCEEDED(rv) && cancel) { diff --git a/embedding/nsIWindowCreator2.idl b/embedding/nsIWindowCreator2.idl index ea581e83e93b..e41483b9de8f 100644 --- a/embedding/nsIWindowCreator2.idl +++ b/embedding/nsIWindowCreator2.idl @@ -26,10 +26,6 @@ interface mozIDOMWindowProxy; interface nsIWindowCreator2 : nsIWindowCreator { - /** - * Definitions for contextFlags - */ - /** Create a new window. Gecko will/may call this method, if made available to it, to create new windows. @param parent Parent window, if any. Null if not. The newly created @@ -37,7 +33,6 @@ interface nsIWindowCreator2 : nsIWindowCreator { the parent, if any (and if the concept applies to the underlying OS). @param chromeFlags Chrome features from nsIWebBrowserChrome - @param contextFlags Flags about the context of the window being created. @param aOpeningTab The TabParent that is trying to open this new chrome window. Can be nullptr. @param aOpener The window which is trying to open this new chrome window. @@ -50,7 +45,6 @@ interface nsIWindowCreator2 : nsIWindowCreator { */ nsIWebBrowserChrome createChromeWindow2(in nsIWebBrowserChrome parent, in uint32_t chromeFlags, - in uint32_t contextFlags, in nsITabParent aOpeningTab, in mozIDOMWindowProxy aOpener, out boolean cancel); diff --git a/toolkit/components/startup/nsAppStartup.cpp b/toolkit/components/startup/nsAppStartup.cpp index 85d5afdf97c8..fcaf578a0856 100644 --- a/toolkit/components/startup/nsAppStartup.cpp +++ b/toolkit/components/startup/nsAppStartup.cpp @@ -611,7 +611,7 @@ nsAppStartup::CreateChromeWindow(nsIWebBrowserChrome *aParent, nsIWebBrowserChrome **_retval) { bool cancel; - return CreateChromeWindow2(aParent, aChromeFlags, 0, nullptr, nullptr, &cancel, _retval); + return CreateChromeWindow2(aParent, aChromeFlags, nullptr, nullptr, &cancel, _retval); } @@ -633,7 +633,6 @@ nsAppStartup::SetScreenId(uint32_t aScreenId) NS_IMETHODIMP nsAppStartup::CreateChromeWindow2(nsIWebBrowserChrome *aParent, uint32_t aChromeFlags, - uint32_t aContextFlags, nsITabParent *aOpeningTab, mozIDOMWindowProxy* aOpener, bool *aCancel, @@ -678,7 +677,6 @@ nsAppStartup::CreateChromeWindow2(nsIWebBrowserChrome *aParent, // if anybody gave us anything to work with, use it if (newWindow) { - newWindow->SetContextFlags(aContextFlags); nsCOMPtr thing(do_QueryInterface(newWindow)); if (thing) CallGetInterface(thing.get(), _retval); diff --git a/xpfe/appshell/nsIXULWindow.idl b/xpfe/appshell/nsIXULWindow.idl index 8db12adb6b72..bc57554808a0 100644 --- a/xpfe/appshell/nsIXULWindow.idl +++ b/xpfe/appshell/nsIXULWindow.idl @@ -103,11 +103,6 @@ interface nsIXULWindow : nsISupports attribute unsigned long zLevel; - /** - * contextFlags are from nsIWindowCreator2 - */ - attribute uint32_t contextFlags; - attribute uint32_t chromeFlags; /** diff --git a/xpfe/appshell/nsXULWindow.cpp b/xpfe/appshell/nsXULWindow.cpp index ae0cbdedb0ae..26d9e3cb4f66 100644 --- a/xpfe/appshell/nsXULWindow.cpp +++ b/xpfe/appshell/nsXULWindow.cpp @@ -105,7 +105,6 @@ nsXULWindow::nsXULWindow(uint32_t aChromeFlags) mIgnoreXULSizeMode(false), mDestroying(false), mRegistered(false), - mContextFlags(0), mPersistentAttributesDirty(0), mPersistentAttributesMask(0), mChromeFlags(aChromeFlags) @@ -254,19 +253,6 @@ NS_IMETHODIMP nsXULWindow::SetZLevel(uint32_t aLevel) return NS_OK; } -NS_IMETHODIMP nsXULWindow::GetContextFlags(uint32_t *aContextFlags) -{ - NS_ENSURE_ARG_POINTER(aContextFlags); - *aContextFlags = mContextFlags; - return NS_OK; -} - -NS_IMETHODIMP nsXULWindow::SetContextFlags(uint32_t aContextFlags) -{ - mContextFlags = aContextFlags; - return NS_OK; -} - NS_IMETHODIMP nsXULWindow::GetChromeFlags(uint32_t *aChromeFlags) { NS_ENSURE_ARG_POINTER(aChromeFlags); diff --git a/xpfe/appshell/nsXULWindow.h b/xpfe/appshell/nsXULWindow.h index eb059c939ee3..2e680c7d2bb1 100644 --- a/xpfe/appshell/nsXULWindow.h +++ b/xpfe/appshell/nsXULWindow.h @@ -163,7 +163,6 @@ protected: // otherwise happen due to script running as we tear down various things. bool mDestroying; bool mRegistered; - uint32_t mContextFlags; uint32_t mPersistentAttributesDirty; // persistentAttributes uint32_t mPersistentAttributesMask; uint32_t mChromeFlags;