From 750c1430ba4a87e06d7f81e313f3ff9e08319490 Mon Sep 17 00:00:00 2001 From: "jevering%netscape.com" Date: Tue, 6 Oct 1998 07:14:41 +0000 Subject: [PATCH] Added GetWindowBounds to sync up window nsIBrowserWindow interface. Fixed EvaluateString call in jsconsole to pass the proper parameters. --- xpfe/xpviewer/src/JSConsole.cpp | 3 +-- xpfe/xpviewer/src/nsBrowserWindow.cpp | 8 ++++++++ xpfe/xpviewer/src/nsBrowserWindow.h | 1 + 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/xpfe/xpviewer/src/JSConsole.cpp b/xpfe/xpviewer/src/JSConsole.cpp index d5e69985c5c..3d940407e51 100644 --- a/xpfe/xpviewer/src/JSConsole.cpp +++ b/xpfe/xpviewer/src/JSConsole.cpp @@ -882,8 +882,7 @@ void JSConsole::EvaluateText(UINT aStartSel, UINT aEndSel) // evaluate the string jsval returnValue; - if (mContext->EvaluateString(cleanBuffer, - strlen(cleanBuffer), + if (mContext->EvaluateString(nsString(cleanBuffer), nsnull, 0, &returnValue)) { diff --git a/xpfe/xpviewer/src/nsBrowserWindow.cpp b/xpfe/xpviewer/src/nsBrowserWindow.cpp index f048e99da21..280001ec1a0 100644 --- a/xpfe/xpviewer/src/nsBrowserWindow.cpp +++ b/xpfe/xpviewer/src/nsBrowserWindow.cpp @@ -2082,6 +2082,14 @@ nsBrowserWindow::GetBounds(nsRect& aBounds) return NS_OK; } +NS_IMETHODIMP +nsBrowserWindow::GetWindowBounds(nsRect& aBounds) +{ + //XXX This needs to be non-client bounds when it exists. + mWindow->GetBounds(aBounds); + return NS_OK; +} + //---------------------------------------------------- NS_IMETHODIMP nsBrowserWindow::Show() diff --git a/xpfe/xpviewer/src/nsBrowserWindow.h b/xpfe/xpviewer/src/nsBrowserWindow.h index 069b397a766..323bdb35913 100644 --- a/xpfe/xpviewer/src/nsBrowserWindow.h +++ b/xpfe/xpviewer/src/nsBrowserWindow.h @@ -79,6 +79,7 @@ public: PRBool aAllowPlugins = PR_TRUE); NS_IMETHOD MoveTo(PRInt32 aX, PRInt32 aY); NS_IMETHOD SizeTo(PRInt32 aWidth, PRInt32 aHeight); + NS_IMETHOD GetWindowBounds(nsRect& aBounds); NS_IMETHOD GetBounds(nsRect& aBounds); NS_IMETHOD Show(); NS_IMETHOD Hide();