diff --git a/content/xul/content/src/nsXULPopupListener.cpp b/content/xul/content/src/nsXULPopupListener.cpp index 27ba0db2b7f6..d28ea033b337 100644 --- a/content/xul/content/src/nsXULPopupListener.cpp +++ b/content/xul/content/src/nsXULPopupListener.cpp @@ -241,7 +241,7 @@ XULPopupListenerImpl::LaunchPopup(nsIDOMEvent* anEvent) nsCOMPtr domWindow = do_QueryInterface(global); if (domWindow != nsnull) { // Find out if we're anchored. - nsString anchorAlignment; + nsString anchorAlignment("none"); element->GetAttribute("popupanchor", anchorAlignment); nsString popupAlignment("topleft"); @@ -249,32 +249,25 @@ XULPopupListenerImpl::LaunchPopup(nsIDOMEvent* anEvent) // Set the popup in the document for the duration of this call. xulDocument->SetPopup(element); - if (anchorAlignment == "") { - // We aren't anchored. Create on the point. - // Retrieve our x and y position. - nsCOMPtruiEvent; - uiEvent = do_QueryInterface(anEvent); - if (!uiEvent) { - //non-ui event passed in. bad things. - return NS_OK; - } + + // Retrieve our x and y position. + nsCOMPtruiEvent; + uiEvent = do_QueryInterface(anEvent); + if (!uiEvent) { + //non-ui event passed in. bad things. + return NS_OK; + } - PRInt32 xPos, yPos; - uiEvent->GetScreenX(&xPos); - uiEvent->GetScreenY(&yPos); - - domWindow->CreatePopup(element, popupContent, - xPos, yPos, - type, popupAlignment); - } - else { - // We're anchored. Pass off to the window, and let it figure out - // from the frame where it wants to put us. - domWindow->CreateAnchoredPopup(element, popupContent, - anchorAlignment, type, popupAlignment); - } - xulDocument->SetPopup(nsnull); - } + PRInt32 xPos, yPos; + uiEvent->GetScreenX(&xPos); + uiEvent->GetScreenY(&yPos); + + domWindow->CreatePopup(element, popupContent, + xPos, yPos, + type, anchorAlignment, popupAlignment); + + // XXX For menus only, clear the document.popup field. + } NS_RELEASE(global); } } @@ -317,9 +310,12 @@ XULPopupListenerImpl::Blur(nsIDOMEvent* aMouseEvent) } } - // XXX Figure out how to fire the DESTRUCT event for the + // XXX Figure out how to fire the DESTROY event for the // arbitrary XUL case + // XXX Set document.popup to null in the parent document NOW. + // xulDocument->SetPopup(nsnull); + return rv; } diff --git a/docshell/base/nsWebShell.cpp b/docshell/base/nsWebShell.cpp index 25754e443a45..fc0df1da8c83 100644 --- a/docshell/base/nsWebShell.cpp +++ b/docshell/base/nsWebShell.cpp @@ -240,7 +240,8 @@ public: NS_IMETHOD ContentShellAdded(nsIWebShell* aChildShell, nsIContent* frameNode); NS_IMETHOD CreatePopup(nsIDOMElement* aElement, nsIDOMElement* aPopupContent, PRInt32 aXPos, PRInt32 aYPos, - const nsString& aPopupType, const nsString& aPopupAlignment, + const nsString& aPopupType, const nsString& anAnchorAlignment, + const nsString& aPopupAlignment, nsIDOMWindow* aWindow); NS_IMETHOD FindWebShellWithName(const PRUnichar* aName, nsIWebShell*& aResult); NS_IMETHOD FocusAvailable(nsIWebShell* aFocusedWebShell, PRBool& aFocusTaken); @@ -1962,11 +1963,13 @@ nsWebShell::ContentShellAdded(nsIWebShell* aChildShell, nsIContent* frameNode) NS_IMETHODIMP nsWebShell::CreatePopup(nsIDOMElement* aElement, nsIDOMElement* aPopupContent, PRInt32 aXPos, PRInt32 aYPos, - const nsString& aPopupType, const nsString& aPopupAlignment, + const nsString& aPopupType, const nsString& anAnchorAlignment, + const nsString& aPopupAlignment, nsIDOMWindow* aWindow) { if (nsnull != mContainer) { - return mContainer->CreatePopup(aElement, aPopupContent, aXPos, aYPos, aPopupType, aPopupAlignment, + return mContainer->CreatePopup(aElement, aPopupContent, aXPos, aYPos, aPopupType, + anAnchorAlignment, aPopupAlignment, aWindow); } return NS_OK; diff --git a/dom/public/base/nsIDOMWindow.h b/dom/public/base/nsIDOMWindow.h index d7ff82de29c3..5bf27ee03388 100644 --- a/dom/public/base/nsIDOMWindow.h +++ b/dom/public/base/nsIDOMWindow.h @@ -139,9 +139,7 @@ public: NS_IMETHOD SetInterval(JSContext *cx, jsval *argv, PRUint32 argc, PRInt32* aReturn)=0; - NS_IMETHOD CreatePopup(nsIDOMElement* aElement, nsIDOMElement* aPopupContent, PRInt32 aXPos, PRInt32 aYPos, const nsString& aPopupType, const nsString& aPopupAlignment)=0; - - NS_IMETHOD CreateAnchoredPopup(nsIDOMElement* aElement, nsIDOMElement* aPopupContent, const nsString& aAnchorAlignment, const nsString& aPopupType, const nsString& aPopupAlignment)=0; + NS_IMETHOD CreatePopup(nsIDOMElement* aElement, nsIDOMElement* aPopupContent, PRInt32 aXPos, PRInt32 aYPos, const nsString& aPopupType, const nsString& aAnchorAlignment, const nsString& aPopupAlignment)=0; NS_IMETHOD Open(JSContext *cx, jsval *argv, PRUint32 argc, nsIDOMWindow** aReturn)=0; @@ -205,8 +203,7 @@ public: NS_IMETHOD ClearInterval(PRInt32 aTimerID); \ NS_IMETHOD SetTimeout(JSContext *cx, jsval *argv, PRUint32 argc, PRInt32* aReturn); \ NS_IMETHOD SetInterval(JSContext *cx, jsval *argv, PRUint32 argc, PRInt32* aReturn); \ - NS_IMETHOD CreatePopup(nsIDOMElement* aElement, nsIDOMElement* aPopupContent, PRInt32 aXPos, PRInt32 aYPos, const nsString& aPopupType, const nsString& aPopupAlignment); \ - NS_IMETHOD CreateAnchoredPopup(nsIDOMElement* aElement, nsIDOMElement* aPopupContent, const nsString& aAnchorAlignment, const nsString& aPopupType, const nsString& aPopupAlignment); \ + NS_IMETHOD CreatePopup(nsIDOMElement* aElement, nsIDOMElement* aPopupContent, PRInt32 aXPos, PRInt32 aYPos, const nsString& aPopupType, const nsString& aAnchorAlignment, const nsString& aPopupAlignment); \ NS_IMETHOD Open(JSContext *cx, jsval *argv, PRUint32 argc, nsIDOMWindow** aReturn); \ NS_IMETHOD OpenDialog(JSContext *cx, jsval *argv, PRUint32 argc, nsIDOMWindow** aReturn); \ @@ -268,8 +265,7 @@ public: NS_IMETHOD ClearInterval(PRInt32 aTimerID) { return _to ClearInterval(aTimerID); } \ NS_IMETHOD SetTimeout(JSContext *cx, jsval *argv, PRUint32 argc, PRInt32* aReturn) { return _to SetTimeout(cx, argv, argc, aReturn); } \ NS_IMETHOD SetInterval(JSContext *cx, jsval *argv, PRUint32 argc, PRInt32* aReturn) { return _to SetInterval(cx, argv, argc, aReturn); } \ - NS_IMETHOD CreatePopup(nsIDOMElement* aElement, nsIDOMElement* aPopupContent, PRInt32 aXPos, PRInt32 aYPos, const nsString& aPopupType, const nsString& aPopupAlignment) { return _to CreatePopup(aElement, aPopupContent, aXPos, aYPos, aPopupType, aPopupAlignment); } \ - NS_IMETHOD CreateAnchoredPopup(nsIDOMElement* aElement, nsIDOMElement* aPopupContent, const nsString& aAnchorAlignment, const nsString& aPopupType, const nsString& aPopupAlignment) { return _to CreateAnchoredPopup(aElement, aPopupContent, aAnchorAlignment, aPopupType, aPopupAlignment); } \ + NS_IMETHOD CreatePopup(nsIDOMElement* aElement, nsIDOMElement* aPopupContent, PRInt32 aXPos, PRInt32 aYPos, const nsString& aPopupType, const nsString& aAnchorAlignment, const nsString& aPopupAlignment) { return _to CreatePopup(aElement, aPopupContent, aXPos, aYPos, aPopupType, aAnchorAlignment, aPopupAlignment); } \ 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); } \ diff --git a/dom/src/base/nsGlobalWindow.cpp b/dom/src/base/nsGlobalWindow.cpp index 3be63774b7d9..0efa58cc038e 100644 --- a/dom/src/base/nsGlobalWindow.cpp +++ b/dom/src/base/nsGlobalWindow.cpp @@ -1717,25 +1717,18 @@ GlobalWindowImpl::ReadyOpenedWebShell(nsIWebShell *aWebShell, nsIDOMWindow **aDO NS_IMETHODIMP GlobalWindowImpl::CreatePopup(nsIDOMElement* aElement, nsIDOMElement* aPopupContent, PRInt32 aXPos, PRInt32 aYPos, - const nsString& aPopupType, const nsString& aPopupAlignment) + const nsString& aPopupType, + const nsString& anAnchorAlignment, const nsString& aPopupAlignment) { // Pass this off to the parent. nsCOMPtr webShellContainer = do_QueryInterface(mWebShell); if (webShellContainer) { webShellContainer->CreatePopup(aElement, aPopupContent, aXPos, aYPos, aPopupType, - aPopupAlignment, this); + anAnchorAlignment, aPopupAlignment, this); } return NS_OK; } -NS_IMETHODIMP -GlobalWindowImpl::CreateAnchoredPopup(nsIDOMElement* aElement, nsIDOMElement* aPopupContent, - const nsString& anAnchorAlignment, - const nsString& aPopupType, const nsString& aPopupAlignment) -{ - 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 b7cd116d65b6..10980b71ec0f 100644 --- a/dom/src/base/nsGlobalWindow.h +++ b/dom/src/base/nsGlobalWindow.h @@ -154,12 +154,9 @@ public: NS_IMETHOD CreatePopup(nsIDOMElement* aElement, nsIDOMElement* aPopupContent, PRInt32 aXPos, PRInt32 aYPos, - const nsString& aPopupType, const nsString& aPopupAlignment); - - NS_IMETHOD CreateAnchoredPopup(nsIDOMElement* aElement, nsIDOMElement* aPopupContent, - const nsString& anAnchorAlignment, - const nsString& aPopupType, const nsString& aPopupAlignment); - + const nsString& aPopupType, const nsString& anAnchorAlignment, + const nsString& aPopupAlignment); + // nsIDOMEventCapturer interface NS_IMETHOD CaptureEvent(const nsString& aType); NS_IMETHOD ReleaseEvent(const nsString& aType); diff --git a/dom/src/base/nsJSWindow.cpp b/dom/src/base/nsJSWindow.cpp index ccc57124c2f9..72a4e37a89ce 100644 --- a/dom/src/base/nsJSWindow.cpp +++ b/dom/src/base/nsJSWindow.cpp @@ -1904,6 +1904,7 @@ WindowCreatePopup(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval * PRInt32 b3; nsAutoString b4; nsAutoString b5; + nsAutoString b6; *rval = JSVAL_NULL; @@ -1927,7 +1928,7 @@ WindowCreatePopup(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval * return JS_TRUE; } - if (argc >= 6) { + if (argc >= 7) { if (JS_FALSE == nsJSUtils::nsConvertJSValToObject((nsISupports **)&b0, kIElementIID, @@ -1959,89 +1960,16 @@ WindowCreatePopup(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval * nsJSUtils::nsConvertJSValToString(b5, cx, argv[5]); - if (NS_OK != nativeThis->CreatePopup(b0, b1, b2, b3, b4, b5)) { + nsJSUtils::nsConvertJSValToString(b6, cx, argv[6]); + + if (NS_OK != nativeThis->CreatePopup(b0, b1, b2, b3, b4, b5, b6)) { return JS_FALSE; } *rval = JSVAL_VOID; } else { - JS_ReportError(cx, "Function createPopup requires 6 parameters"); - return JS_FALSE; - } - - return JS_TRUE; -} - - -// -// Native method CreateAnchoredPopup -// -PR_STATIC_CALLBACK(JSBool) -WindowCreateAnchoredPopup(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) -{ - nsIDOMWindow *nativeThis = (nsIDOMWindow*)JS_GetPrivate(cx, obj); - JSBool rBool = JS_FALSE; - nsIDOMElementPtr b0; - nsIDOMElementPtr b1; - nsAutoString b2; - nsAutoString b3; - nsAutoString b4; - - *rval = JSVAL_NULL; - - nsIScriptContext *scriptCX = (nsIScriptContext *)JS_GetContextPrivate(cx); - nsIScriptSecurityManager *secMan; - if (NS_OK == scriptCX->GetSecurityManager(&secMan)) { - PRBool ok; - secMan->CheckScriptAccess(scriptCX, obj, "window.createanchoredpopup", &ok); - if (!ok) { - //Need to throw error here - return JS_FALSE; - } - NS_RELEASE(secMan); - } - else { - return JS_FALSE; - } - - // If there's no private data, this must be the prototype, so ignore - if (nsnull == nativeThis) { - return JS_TRUE; - } - - if (argc >= 5) { - - if (JS_FALSE == nsJSUtils::nsConvertJSValToObject((nsISupports **)&b0, - kIElementIID, - "Element", - cx, - argv[0])) { - return JS_FALSE; - } - - if (JS_FALSE == nsJSUtils::nsConvertJSValToObject((nsISupports **)&b1, - kIElementIID, - "Element", - cx, - argv[1])) { - return JS_FALSE; - } - - nsJSUtils::nsConvertJSValToString(b2, cx, argv[2]); - - nsJSUtils::nsConvertJSValToString(b3, cx, argv[3]); - - nsJSUtils::nsConvertJSValToString(b4, cx, argv[4]); - - if (NS_OK != nativeThis->CreateAnchoredPopup(b0, b1, b2, b3, b4)) { - return JS_FALSE; - } - - *rval = JSVAL_VOID; - } - else { - JS_ReportError(cx, "Function createAnchoredPopup requires 5 parameters"); + JS_ReportError(cx, "Function createPopup requires 7 parameters"); return JS_FALSE; } @@ -2486,8 +2414,7 @@ static JSFunctionSpec WindowMethods[] = {"clearInterval", WindowClearInterval, 1}, {"setTimeout", WindowSetTimeout, 0}, {"setInterval", WindowSetInterval, 0}, - {"createPopup", WindowCreatePopup, 6}, - {"createAnchoredPopup", WindowCreateAnchoredPopup, 5}, + {"createPopup", WindowCreatePopup, 7}, {"open", WindowOpen, 0}, {"openDialog", WindowOpenDialog, 0}, {"captureEvent", EventCapturerCaptureEvent, 1}, diff --git a/rdf/content/src/nsXULPopupListener.cpp b/rdf/content/src/nsXULPopupListener.cpp index 27ba0db2b7f6..d28ea033b337 100644 --- a/rdf/content/src/nsXULPopupListener.cpp +++ b/rdf/content/src/nsXULPopupListener.cpp @@ -241,7 +241,7 @@ XULPopupListenerImpl::LaunchPopup(nsIDOMEvent* anEvent) nsCOMPtr domWindow = do_QueryInterface(global); if (domWindow != nsnull) { // Find out if we're anchored. - nsString anchorAlignment; + nsString anchorAlignment("none"); element->GetAttribute("popupanchor", anchorAlignment); nsString popupAlignment("topleft"); @@ -249,32 +249,25 @@ XULPopupListenerImpl::LaunchPopup(nsIDOMEvent* anEvent) // Set the popup in the document for the duration of this call. xulDocument->SetPopup(element); - if (anchorAlignment == "") { - // We aren't anchored. Create on the point. - // Retrieve our x and y position. - nsCOMPtruiEvent; - uiEvent = do_QueryInterface(anEvent); - if (!uiEvent) { - //non-ui event passed in. bad things. - return NS_OK; - } + + // Retrieve our x and y position. + nsCOMPtruiEvent; + uiEvent = do_QueryInterface(anEvent); + if (!uiEvent) { + //non-ui event passed in. bad things. + return NS_OK; + } - PRInt32 xPos, yPos; - uiEvent->GetScreenX(&xPos); - uiEvent->GetScreenY(&yPos); - - domWindow->CreatePopup(element, popupContent, - xPos, yPos, - type, popupAlignment); - } - else { - // We're anchored. Pass off to the window, and let it figure out - // from the frame where it wants to put us. - domWindow->CreateAnchoredPopup(element, popupContent, - anchorAlignment, type, popupAlignment); - } - xulDocument->SetPopup(nsnull); - } + PRInt32 xPos, yPos; + uiEvent->GetScreenX(&xPos); + uiEvent->GetScreenY(&yPos); + + domWindow->CreatePopup(element, popupContent, + xPos, yPos, + type, anchorAlignment, popupAlignment); + + // XXX For menus only, clear the document.popup field. + } NS_RELEASE(global); } } @@ -317,9 +310,12 @@ XULPopupListenerImpl::Blur(nsIDOMEvent* aMouseEvent) } } - // XXX Figure out how to fire the DESTRUCT event for the + // XXX Figure out how to fire the DESTROY event for the // arbitrary XUL case + // XXX Set document.popup to null in the parent document NOW. + // xulDocument->SetPopup(nsnull); + return rv; } diff --git a/webshell/embed/ActiveX/WebShellContainer.cpp b/webshell/embed/ActiveX/WebShellContainer.cpp index 1f3cdb5d3d94..1732d402a3b6 100644 --- a/webshell/embed/ActiveX/WebShellContainer.cpp +++ b/webshell/embed/ActiveX/WebShellContainer.cpp @@ -266,7 +266,8 @@ CWebShellContainer::ContentShellAdded(nsIWebShell* aWebShell, nsIContent* frameN NS_IMETHODIMP CWebShellContainer::CreatePopup(nsIDOMElement* aElement, nsIDOMElement* aPopupContent, PRInt32 aXPos, PRInt32 aYPos, - const nsString& aPopupType, const nsString& aPopupAlignment, + const nsString& aPopupType, const nsString& anAnchorAlignment, + const nsString& aPopupAlignment, nsIDOMWindow* aWindow) { return NS_OK; diff --git a/webshell/embed/ActiveX/WebShellContainer.h b/webshell/embed/ActiveX/WebShellContainer.h index ebdbf8023b38..bfbc2a410edf 100644 --- a/webshell/embed/ActiveX/WebShellContainer.h +++ b/webshell/embed/ActiveX/WebShellContainer.h @@ -57,7 +57,8 @@ public: NS_IMETHOD ContentShellAdded(nsIWebShell* aWebShell, nsIContent* frameNode); NS_IMETHOD CreatePopup(nsIDOMElement* aElement, nsIDOMElement* aPopupContent, PRInt32 aXPos, PRInt32 aYPos, - const nsString& aPopupType, const nsString& aPopupAlignment, + const nsString& aPopupType, const nsString& anAnchorAlignment, + const nsString& aPopupAlignment, nsIDOMWindow* aWindow); // nsIStreamObserver diff --git a/webshell/embed/gtk/lib/GtkMozillaContainer.cpp b/webshell/embed/gtk/lib/GtkMozillaContainer.cpp index 48cbcf63388b..fbdf537fd600 100644 --- a/webshell/embed/gtk/lib/GtkMozillaContainer.cpp +++ b/webshell/embed/gtk/lib/GtkMozillaContainer.cpp @@ -355,7 +355,9 @@ GtkMozillaContainer::ContentShellAdded(nsIWebShell* aChildShell, nsIContent* fra NS_IMETHODIMP GtkMozillaContainer::CreatePopup(nsIDOMElement* aElement, nsIDOMElement* aPopupContent, PRInt32 aXPos, PRInt32 aYPos, - const nsString& aPopupType, const nsString& aPopupAlignment, + const nsString& aPopupType, + const nsString& anAnchorAlignment, + const nsString& aPopupAlignment, nsIDOMWindow* aWindow) { printf("CreatePopup\n"); diff --git a/webshell/embed/gtk/lib/GtkMozillaContainer.h b/webshell/embed/gtk/lib/GtkMozillaContainer.h index ca9c2c326034..bd6e567d4a42 100644 --- a/webshell/embed/gtk/lib/GtkMozillaContainer.h +++ b/webshell/embed/gtk/lib/GtkMozillaContainer.h @@ -55,7 +55,8 @@ public: NS_IMETHOD CreatePopup(nsIDOMElement* aElement, nsIDOMElement* aPopupContent, PRInt32 aXPos, PRInt32 aYPos, - const nsString& aPopupType, const nsString& aPopupAlignment, + const nsString& aPopupType, const nsString& anAnchorAlignment, + const nsString& aPopupAlignment, nsIDOMWindow* aWindow); NS_IMETHOD ChildShellAdded(nsIWebShell** aChildShell, nsIContent* frameNode); diff --git a/webshell/public/nsIWebShell.h b/webshell/public/nsIWebShell.h index 3e92d80c2c74..0b63d7b427e9 100644 --- a/webshell/public/nsIWebShell.h +++ b/webshell/public/nsIWebShell.h @@ -104,7 +104,8 @@ public: NS_IMETHOD CreatePopup(nsIDOMElement* aElement, nsIDOMElement* aPopupContent, PRInt32 aXPos, PRInt32 aYPos, - const nsString& aPopupType, const nsString& aPopupAlignment, + const nsString& aPopupType, const nsString& anAnchorAlignment, + const nsString& aPopupAlignment, nsIDOMWindow* aWindow) = 0; /** diff --git a/webshell/src/nsWebShell.cpp b/webshell/src/nsWebShell.cpp index 25754e443a45..fc0df1da8c83 100644 --- a/webshell/src/nsWebShell.cpp +++ b/webshell/src/nsWebShell.cpp @@ -240,7 +240,8 @@ public: NS_IMETHOD ContentShellAdded(nsIWebShell* aChildShell, nsIContent* frameNode); NS_IMETHOD CreatePopup(nsIDOMElement* aElement, nsIDOMElement* aPopupContent, PRInt32 aXPos, PRInt32 aYPos, - const nsString& aPopupType, const nsString& aPopupAlignment, + const nsString& aPopupType, const nsString& anAnchorAlignment, + const nsString& aPopupAlignment, nsIDOMWindow* aWindow); NS_IMETHOD FindWebShellWithName(const PRUnichar* aName, nsIWebShell*& aResult); NS_IMETHOD FocusAvailable(nsIWebShell* aFocusedWebShell, PRBool& aFocusTaken); @@ -1962,11 +1963,13 @@ nsWebShell::ContentShellAdded(nsIWebShell* aChildShell, nsIContent* frameNode) NS_IMETHODIMP nsWebShell::CreatePopup(nsIDOMElement* aElement, nsIDOMElement* aPopupContent, PRInt32 aXPos, PRInt32 aYPos, - const nsString& aPopupType, const nsString& aPopupAlignment, + const nsString& aPopupType, const nsString& anAnchorAlignment, + const nsString& aPopupAlignment, nsIDOMWindow* aWindow) { if (nsnull != mContainer) { - return mContainer->CreatePopup(aElement, aPopupContent, aXPos, aYPos, aPopupType, aPopupAlignment, + return mContainer->CreatePopup(aElement, aPopupContent, aXPos, aYPos, aPopupType, + anAnchorAlignment, aPopupAlignment, aWindow); } return NS_OK; diff --git a/webshell/tests/viewer/nsBrowserWindow.cpp b/webshell/tests/viewer/nsBrowserWindow.cpp index 1fac8c4f5972..eb6138d24009 100644 --- a/webshell/tests/viewer/nsBrowserWindow.cpp +++ b/webshell/tests/viewer/nsBrowserWindow.cpp @@ -1755,7 +1755,8 @@ nsBrowserWindow::ContentShellAdded(nsIWebShell* aChildShell, nsIContent* frameNo NS_IMETHODIMP nsBrowserWindow::CreatePopup(nsIDOMElement* aElement, nsIDOMElement* aPopupContent, PRInt32 aXPos, PRInt32 aYPos, - const nsString& aPopupType, const nsString& aPopupAlignment, + const nsString& aPopupType, const nsString& anAnchorAlignment, + const nsString& aPopupAlignment, nsIDOMWindow* aWindow) { return NS_OK; diff --git a/webshell/tests/viewer/nsBrowserWindow.h b/webshell/tests/viewer/nsBrowserWindow.h index 3883337b2867..6acc5212edec 100644 --- a/webshell/tests/viewer/nsBrowserWindow.h +++ b/webshell/tests/viewer/nsBrowserWindow.h @@ -112,7 +112,8 @@ public: NS_IMETHOD ContentShellAdded(nsIWebShell* aChildShell, nsIContent* frameNode); NS_IMETHOD CreatePopup(nsIDOMElement* aElement, nsIDOMElement* aPopupContent, PRInt32 aXPos, PRInt32 aYPos, - const nsString& aPopupType, const nsString& aPopupAlignment, + const nsString& aPopupType, const nsString& anAnchorAlignment, + const nsString& aPopupAlignment, nsIDOMWindow* aWindow); NS_IMETHOD FindWebShellWithName(const PRUnichar* aName, nsIWebShell*& aResult); NS_IMETHOD FocusAvailable(nsIWebShell* aFocusedWebShell, PRBool& aFocusTaken); diff --git a/webshell/tests/viewer/nsXPBaseWindow.cpp b/webshell/tests/viewer/nsXPBaseWindow.cpp index f1e8a4ec8f14..d715b17b0672 100644 --- a/webshell/tests/viewer/nsXPBaseWindow.cpp +++ b/webshell/tests/viewer/nsXPBaseWindow.cpp @@ -570,7 +570,8 @@ nsXPBaseWindow::ContentShellAdded(nsIWebShell* aChildShell, nsIContent* frameNod NS_IMETHODIMP nsXPBaseWindow::CreatePopup(nsIDOMElement* aElement, nsIDOMElement* aPopupContent, PRInt32 aXPos, PRInt32 aYPos, - const nsString& aPopupType, const nsString& aPopupAlignment, + const nsString& aPopupType, const nsString& anAnchorAlignment, + const nsString& aPopupAlignment, nsIDOMWindow* aWindow) { return NS_OK; diff --git a/webshell/tests/viewer/nsXPBaseWindow.h b/webshell/tests/viewer/nsXPBaseWindow.h index 3e91b3f2c724..72509ed3a99b 100644 --- a/webshell/tests/viewer/nsXPBaseWindow.h +++ b/webshell/tests/viewer/nsXPBaseWindow.h @@ -100,7 +100,8 @@ public: NS_IMETHOD ContentShellAdded(nsIWebShell* aChildShell, nsIContent* frameNode); NS_IMETHOD CreatePopup(nsIDOMElement* aElement, nsIDOMElement* aPopupContent, PRInt32 aXPos, PRInt32 aYPos, - const nsString& aPopupType, const nsString& aPopupAlignment, + const nsString& aPopupType, const nsString& anAnchorAlignment, + const nsString& aPopupAlignment, nsIDOMWindow* aWindow); NS_IMETHOD FindWebShellWithName(const PRUnichar* aName, nsIWebShell*& aResult); NS_IMETHOD FocusAvailable(nsIWebShell* aFocusedWebShell, PRBool& aFocusTaken); diff --git a/xpfe/appshell/src/nsWebShellWindow.cpp b/xpfe/appshell/src/nsWebShellWindow.cpp index e61693dd8e39..4ac46b18cbd5 100644 --- a/xpfe/appshell/src/nsWebShellWindow.cpp +++ b/xpfe/appshell/src/nsWebShellWindow.cpp @@ -968,7 +968,8 @@ nsWebShellWindow::ConvertWebShellToDOMWindow(nsIWebShell* aShell, nsIDOMWindow** NS_IMETHODIMP nsWebShellWindow::CreatePopup(nsIDOMElement* aElement, nsIDOMElement* aPopupContent, PRInt32 aXPos, PRInt32 aYPos, - const nsString& aPopupType, const nsString& aPopupAlignment, + const nsString& aPopupType, const nsString& anAnchorAlignment, + const nsString& aPopupAlignment, nsIDOMWindow* aWindow) { nsresult rv = NS_OK; diff --git a/xpfe/appshell/src/nsWebShellWindow.h b/xpfe/appshell/src/nsWebShellWindow.h index 45f1f2510133..32e80a841cea 100644 --- a/xpfe/appshell/src/nsWebShellWindow.h +++ b/xpfe/appshell/src/nsWebShellWindow.h @@ -86,7 +86,8 @@ public: NS_IMETHOD CreatePopup(nsIDOMElement* aElement, nsIDOMElement* aPopupContent, PRInt32 aXPos, PRInt32 aYPos, - const nsString& aPopupType, const nsString& aPopupAlignment, + const nsString& aPopupType, const nsString& anAnchorAlignment, + const nsString& aPopupAlignment, nsIDOMWindow* aWindow); NS_IMETHOD ContentShellAdded(nsIWebShell* aChildShell, nsIContent* frameNode);