diff --git a/dom/public/base/nsIDOMWindow.h b/dom/public/base/nsIDOMWindow.h index 4f34ddb2464..c98d6a84616 100644 --- a/dom/public/base/nsIDOMWindow.h +++ b/dom/public/base/nsIDOMWindow.h @@ -30,7 +30,6 @@ #include "jsapi.h" class nsIDOMNavigator; -class nsIDOMElement; class nsIDOMDocument; class nsIDOMBarProp; class nsIDOMScreen; @@ -184,8 +183,6 @@ public: NS_IMETHOD DisableExternalCapture()=0; - NS_IMETHOD CreatePopup(nsIDOMElement* aElement, nsIDOMElement* aPopupContent, PRInt32 aXPos, PRInt32 aYPos, const nsString& aPopupType, const nsString& aAnchorAlignment, const nsString& aPopupAlignment, nsIDOMWindow** aReturn)=0; - NS_IMETHOD Open(JSContext* cx, jsval* argv, PRUint32 argc, nsIDOMWindow** aReturn)=0; NS_IMETHOD OpenDialog(JSContext* cx, jsval* argv, PRUint32 argc, nsIDOMWindow** aReturn)=0; @@ -275,7 +272,6 @@ public: NS_IMETHOD RouteEvent(nsIDOMEvent* aEvt); \ NS_IMETHOD EnableExternalCapture(); \ NS_IMETHOD DisableExternalCapture(); \ - NS_IMETHOD CreatePopup(nsIDOMElement* aElement, nsIDOMElement* aPopupContent, PRInt32 aXPos, PRInt32 aYPos, const nsString& aPopupType, const nsString& aAnchorAlignment, const nsString& aPopupAlignment, nsIDOMWindow** aReturn); \ NS_IMETHOD Open(JSContext* cx, jsval* argv, PRUint32 argc, nsIDOMWindow** aReturn); \ NS_IMETHOD OpenDialog(JSContext* cx, jsval* argv, PRUint32 argc, nsIDOMWindow** aReturn); \ NS_IMETHOD Close(); \ @@ -360,7 +356,6 @@ public: NS_IMETHOD RouteEvent(nsIDOMEvent* aEvt) { return _to RouteEvent(aEvt); } \ NS_IMETHOD EnableExternalCapture() { return _to EnableExternalCapture(); } \ NS_IMETHOD DisableExternalCapture() { return _to DisableExternalCapture(); } \ - NS_IMETHOD CreatePopup(nsIDOMElement* aElement, nsIDOMElement* aPopupContent, PRInt32 aXPos, PRInt32 aYPos, const nsString& aPopupType, const nsString& aAnchorAlignment, const nsString& aPopupAlignment, nsIDOMWindow** aReturn) { return _to CreatePopup(aElement, aPopupContent, aXPos, aYPos, aPopupType, aAnchorAlignment, aPopupAlignment, aReturn); } \ NS_IMETHOD Open(JSContext* cx, jsval* argv, PRUint32 argc, nsIDOMWindow** aReturn) { return _to Open(cx, argv, argc, aReturn); } \ NS_IMETHOD OpenDialog(JSContext* cx, jsval* argv, PRUint32 argc, nsIDOMWindow** aReturn) { return _to OpenDialog(cx, argv, argc, aReturn); } \ NS_IMETHOD Close() { return _to Close(); } \ diff --git a/dom/public/idl/base/Window.idl b/dom/public/idl/base/Window.idl index 47ed26337eb..dbcd3b6c59e 100644 --- a/dom/public/idl/base/Window.idl +++ b/dom/public/idl/base/Window.idl @@ -68,11 +68,6 @@ void enableExternalCapture(); void disableExternalCapture(); - Window createPopup(in Element element, in Element popupContent, - in long xPos, in long yPos, - in DOMString popupType, in DOMString anchorAlignment, - in DOMString popupAlignment); - Window open(/* ... */); Window openDialog(/* ... */); noscript void close(); diff --git a/dom/public/nsDOMPropEnums.h b/dom/public/nsDOMPropEnums.h index 64b134c10e0..416dcdf260e 100644 --- a/dom/public/nsDOMPropEnums.h +++ b/dom/public/nsDOMPropEnums.h @@ -811,7 +811,6 @@ enum nsDOMProp { NS_DOM_PROP_WINDOW_CONFIRM, NS_DOM_PROP_WINDOW_CONTENT, NS_DOM_PROP_WINDOW_CONTROLLERS, - NS_DOM_PROP_WINDOW_CREATEPOPUP, NS_DOM_PROP_WINDOW_DEFAULTSTATUS, NS_DOM_PROP_WINDOW_DIRECTORIES, NS_DOM_PROP_WINDOW_DISABLEEXTERNALCAPTURE, diff --git a/dom/public/nsDOMPropNames.h b/dom/public/nsDOMPropNames.h index c921cf26276..7ff1c15368a 100644 --- a/dom/public/nsDOMPropNames.h +++ b/dom/public/nsDOMPropNames.h @@ -810,7 +810,6 @@ "window.confirm", \ "window.content", \ "window.controllers", \ - "window.createpopup", \ "window.defaultstatus", \ "window.directories", \ "window.disableexternalcapture", \ diff --git a/dom/src/base/nsGlobalWindow.cpp b/dom/src/base/nsGlobalWindow.cpp index 3985fdbb14d..6562823b15f 100644 --- a/dom/src/base/nsGlobalWindow.cpp +++ b/dom/src/base/nsGlobalWindow.cpp @@ -2904,24 +2904,6 @@ GlobalWindowImpl::WebShellToDOMWindow(nsIWebShell *aWebShell, nsIDOMWindow **aDO return CallQueryInterface(globalObject.get(), aDOMWindow); } -NS_IMETHODIMP -GlobalWindowImpl::CreatePopup(nsIDOMElement* aElement, nsIDOMElement* aPopupContent, - PRInt32 aXPos, PRInt32 aYPos, - const nsString& aPopupType, - const nsString& anAnchorAlignment, const nsString& aPopupAlignment, - nsIDOMWindow** outPopup) -{ - if (nsnull != mWebShell) { - // Pass this off to the parent. - nsCOMPtr webShellContainer = do_QueryInterface(mWebShell); - if (webShellContainer) { - webShellContainer->CreatePopup(aElement, aPopupContent, aXPos, aYPos, aPopupType, - anAnchorAlignment, aPopupAlignment, this, outPopup); - } - } - return NS_OK; -} - nsresult GlobalWindowImpl::CheckWindowName(JSContext *cx, nsString& aName) { diff --git a/dom/src/base/nsGlobalWindow.h b/dom/src/base/nsGlobalWindow.h index af7fc2cff34..9a291132902 100644 --- a/dom/src/base/nsGlobalWindow.h +++ b/dom/src/base/nsGlobalWindow.h @@ -194,10 +194,6 @@ public: NS_IMETHOD EnableExternalCapture(); NS_IMETHOD DisableExternalCapture(); - NS_IMETHOD CreatePopup(nsIDOMElement* aElement, nsIDOMElement* aPopupContent, - PRInt32 aXPos, PRInt32 aYPos, - const nsString& aPopupType, const nsString& anAnchorAlignment, - const nsString& aPopupAlignment, nsIDOMWindow** outPopup); NS_IMETHOD GetControllers(nsIControllers** aResult); // nsIDOMEventReceiver interface diff --git a/dom/src/base/nsJSWindow.cpp b/dom/src/base/nsJSWindow.cpp index 0e1b8c1a7dd..120645500a5 100644 --- a/dom/src/base/nsJSWindow.cpp +++ b/dom/src/base/nsJSWindow.cpp @@ -35,7 +35,6 @@ #include "nsDOMPropEnums.h" #include "nsString.h" #include "nsIDOMNavigator.h" -#include "nsIDOMElement.h" #include "nsIDOMDocument.h" #include "nsIDOMBarProp.h" #include "nsIDOMAbstractView.h" @@ -53,7 +52,6 @@ static NS_DEFINE_IID(kIScriptObjectOwnerIID, NS_ISCRIPTOBJECTOWNER_IID); static NS_DEFINE_IID(kIJSScriptObjectIID, NS_IJSSCRIPTOBJECT_IID); static NS_DEFINE_IID(kIScriptGlobalObjectIID, NS_ISCRIPTGLOBALOBJECT_IID); static NS_DEFINE_IID(kINavigatorIID, NS_IDOMNAVIGATOR_IID); -static NS_DEFINE_IID(kIElementIID, NS_IDOMELEMENT_IID); static NS_DEFINE_IID(kIDocumentIID, NS_IDOMDOCUMENT_IID); static NS_DEFINE_IID(kIBarPropIID, NS_IDOMBARPROP_IID); static NS_DEFINE_IID(kIAbstractViewIID, NS_IDOMABSTRACTVIEW_IID); @@ -2449,85 +2447,6 @@ WindowDisableExternalCapture(JSContext *cx, JSObject *obj, uintN argc, jsval *ar } -// -// Native method CreatePopup -// -PR_STATIC_CALLBACK(JSBool) -WindowCreatePopup(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) -{ - nsIDOMWindow *nativeThis = (nsIDOMWindow*)nsJSUtils::nsGetNativeThis(cx, obj); - nsresult result = NS_OK; - nsIDOMWindow* nativeRet; - nsCOMPtr b0; - nsCOMPtr b1; - PRInt32 b2; - PRInt32 b3; - nsAutoString b4; - nsAutoString b5; - nsAutoString b6; - // If there's no private data, this must be the prototype, so ignore - if (nsnull == nativeThis) { - return JS_TRUE; - } - - { - - *rval = JSVAL_NULL; - - { - PRBool ok; - nsresult rv; - NS_WITH_SERVICE(nsIScriptSecurityManager, secMan, - NS_SCRIPTSECURITYMANAGER_PROGID, &rv); - if (NS_FAILED(rv)) { - return nsJSUtils::nsReportError(cx, obj, NS_ERROR_DOM_SECMAN_ERR); - } - secMan->CheckScriptAccess(cx, obj, NS_DOM_PROP_WINDOW_CREATEPOPUP, PR_FALSE, &ok); - if (!ok) { - return nsJSUtils::nsReportError(cx, obj, NS_ERROR_DOM_SECURITY_ERR); - } - } - - if (argc < 7) { - return nsJSUtils::nsReportError(cx, obj, NS_ERROR_DOM_TOO_FEW_PARAMETERS_ERR); - } - - if (JS_FALSE == nsJSUtils::nsConvertJSValToObject((nsISupports **)(void**)getter_AddRefs(b0), - kIElementIID, - "Element", - cx, - argv[0])) { - return nsJSUtils::nsReportError(cx, obj, NS_ERROR_DOM_NOT_OBJECT_ERR); - } - if (JS_FALSE == nsJSUtils::nsConvertJSValToObject((nsISupports **)(void**)getter_AddRefs(b1), - kIElementIID, - "Element", - cx, - argv[1])) { - return nsJSUtils::nsReportError(cx, obj, NS_ERROR_DOM_NOT_OBJECT_ERR); - } - if (!JS_ValueToInt32(cx, argv[2], (int32 *)&b2)) { - return nsJSUtils::nsReportError(cx, obj, NS_ERROR_DOM_NOT_NUMBER_ERR); - } - if (!JS_ValueToInt32(cx, argv[3], (int32 *)&b3)) { - return nsJSUtils::nsReportError(cx, obj, NS_ERROR_DOM_NOT_NUMBER_ERR); - } - nsJSUtils::nsConvertJSValToString(b4, cx, argv[4]); - nsJSUtils::nsConvertJSValToString(b5, cx, argv[5]); - nsJSUtils::nsConvertJSValToString(b6, cx, argv[6]); - - result = nativeThis->CreatePopup(b0, b1, b2, b3, b4, b5, b6, &nativeRet); - if (NS_FAILED(result)) { - return nsJSUtils::nsReportError(cx, obj, result); - } - - nsJSUtils::nsConvertObjectToJSVal(nativeRet, cx, obj, rval); - } - - return JS_TRUE; -} - - // // Native method Open // @@ -2990,7 +2909,6 @@ static JSFunctionSpec WindowMethods[] = {"routeEvent", WindowRouteEvent, 1}, {"enableExternalCapture", WindowEnableExternalCapture, 0}, {"disableExternalCapture", WindowDisableExternalCapture, 0}, - {"createPopup", WindowCreatePopup, 7}, {"open", WindowOpen, 0}, {"openDialog", WindowOpenDialog, 0}, {"close", WindowClose, 0},