From a9290ef91ec408fa7886b99cc59be40b413a0ce0 Mon Sep 17 00:00:00 2001 From: Gaming4JC Date: Tue, 21 Jan 2020 20:00:48 -0500 Subject: Issue #1366 - Completely remove showModalDialog --- dom/base/nsGlobalWindow.h | 61 +---------------------------------------------- 1 file changed, 1 insertion(+), 60 deletions(-) (limited to 'dom/base/nsGlobalWindow.h') diff --git a/dom/base/nsGlobalWindow.h b/dom/base/nsGlobalWindow.h index 1f420895c..5cfd3f056 100644 --- a/dom/base/nsGlobalWindow.h +++ b/dom/base/nsGlobalWindow.h @@ -458,9 +458,6 @@ public: static bool IsPrivilegedChromeWindow(JSContext* /* unused */, JSObject* aObj); - static bool IsShowModalDialogEnabled(JSContext* /* unused */ = nullptr, - JSObject* /* unused */ = nullptr); - bool DoResolve(JSContext* aCx, JS::Handle aObj, JS::Handle aId, JS::MutableHandle aDesc); @@ -583,9 +580,6 @@ public: return mIsChrome; } - using nsPIDOMWindow::IsModalContentWindow; - static bool IsModalContentWindow(JSContext* aCx, JSObject* aGlobal); - // GetScrollFrame does not flush. Callers should do it themselves as needed, // depending on which info they actually want off the scrollable frame. nsIScrollableFrame *GetScrollFrame(); @@ -950,12 +944,6 @@ public: mozilla::ErrorResult& aRv); void PrintOuter(mozilla::ErrorResult& aError); void Print(mozilla::ErrorResult& aError); - void ShowModalDialog(JSContext* aCx, const nsAString& aUrl, - JS::Handle aArgument, - const nsAString& aOptions, - JS::MutableHandle aRetval, - nsIPrincipal& aSubjectPrincipal, - mozilla::ErrorResult& aError); void PostMessageMoz(JSContext* aCx, JS::Handle aMessage, const nsAString& aTargetOrigin, const mozilla::dom::Optional >& aTransfer, @@ -1227,12 +1215,6 @@ public: mozilla::dom::Element* aPanel, mozilla::ErrorResult& aError); - void GetDialogArgumentsOuter(JSContext* aCx, JS::MutableHandle aRetval, - nsIPrincipal& aSubjectPrincipal, - mozilla::ErrorResult& aError); - void GetDialogArguments(JSContext* aCx, JS::MutableHandle aRetval, - nsIPrincipal& aSubjectPrincipal, - mozilla::ErrorResult& aError); void GetReturnValueOuter(JSContext* aCx, JS::MutableHandle aReturnValue, nsIPrincipal& aSubjectPrincipal, mozilla::ErrorResult& aError); @@ -1681,18 +1663,6 @@ protected: nsIPrincipal& aSubjectPrincipal, mozilla::ErrorResult& aError); - already_AddRefed - ShowModalDialogOuter(const nsAString& aUrl, nsIVariant* aArgument, - const nsAString& aOptions, - nsIPrincipal& aSubjectPrincipal, - mozilla::ErrorResult& aError); - - already_AddRefed - ShowModalDialog(const nsAString& aUrl, nsIVariant* aArgument, - const nsAString& aOptions, - nsIPrincipal& aSubjectPrincipal, - mozilla::ErrorResult& aError); - // Ask the user if further dialogs should be blocked, if dialogs are currently // being abused. This is used in the cases where we have no modifiable UI to // show, in that case we show a separate dialog to ask this question. @@ -1832,9 +1802,6 @@ protected: // For |window.arguments|, via |openDialog|. nsCOMPtr mArguments; - // For |window.dialogArguments|, via |showModalDialog|. - RefPtr mDialogArguments; - // Only used in the outer. RefPtr mReturnValue; @@ -2067,40 +2034,14 @@ public: nsCOMPtr mOpenerForInitialContentBrowser; }; -/* - * nsGlobalModalWindow inherits from nsGlobalWindow. It is the global - * object created for a modal content windows only (i.e. not modal - * chrome dialogs). - */ -class nsGlobalModalWindow : public nsGlobalWindow, - public nsIDOMModalContentWindow -{ -public: - NS_DECL_ISUPPORTS_INHERITED - NS_DECL_NSIDOMMODALCONTENTWINDOW - - static already_AddRefed Create(nsGlobalWindow *aOuterWindow); - -protected: - explicit nsGlobalModalWindow(nsGlobalWindow *aOuterWindow) - : nsGlobalWindow(aOuterWindow) - { - mIsModalContentWindow = true; - } - - ~nsGlobalModalWindow() {} -}; - /* factory function */ inline already_AddRefed -NS_NewScriptGlobalObject(bool aIsChrome, bool aIsModalContentWindow) +NS_NewScriptGlobalObject(bool aIsChrome) { RefPtr global; if (aIsChrome) { global = nsGlobalChromeWindow::Create(nullptr); - } else if (aIsModalContentWindow) { - global = nsGlobalModalWindow::Create(nullptr); } else { global = nsGlobalWindow::Create(nullptr); } -- cgit v1.2.3