r=marklin
a=edburns Get webclient working againg with tbogard's help on what has changed with webshell. git-svn-id: svn://10.0.0.236/trunk@56517 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -79,6 +79,10 @@ nsMacMessageSink gMessageSink;
|
||||
#include "DocumentObserver.h"
|
||||
#include "nsIDocumentLoader.h"
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIBaseWindow.h"
|
||||
|
||||
|
||||
#ifdef XP_PC
|
||||
|
||||
#define APPSHELL_DLL "appshell.dll"
|
||||
@@ -338,19 +342,6 @@ EmbeddedEventHandler (void * arg) {
|
||||
return;
|
||||
}
|
||||
|
||||
rv = initContext->webShell->SetContainer((nsIWebShellContainer *) initContext->webShell); // PENDING(edburns): I don't think this is correct.
|
||||
if (NS_FAILED(rv)) {
|
||||
initContext->initFailCode = kInitWebShellError;
|
||||
return;
|
||||
}
|
||||
|
||||
rv = initContext->webShell->SetWebShellType(nsWebShellChrome); // PENDING(edburns): I don't think this is correct.
|
||||
if (NS_FAILED(rv)) {
|
||||
initContext->initFailCode = kInitWebShellError;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
#if DEBUG_RAPTOR_CANVAS
|
||||
printf("EmbeddedEventHandler(%lx): Install Prefs in the Webshell...\n", initContext);
|
||||
#endif
|
||||
@@ -380,13 +371,16 @@ EmbeddedEventHandler (void * arg) {
|
||||
printf("EmbeddedEventHandler(%lx): Show the WebShell...\n", initContext);
|
||||
#endif
|
||||
|
||||
nsActionEvent tAction(initContext->webShell);
|
||||
nsIBrowserWindow *browserWindow = NULL;
|
||||
|
||||
if (NULL == (browserWindow = tAction.getBrowserWindow())) {
|
||||
rv = browserWindow->Show();
|
||||
browserWindow->Release();
|
||||
nsCOMPtr<nsIBaseWindow> baseWindow;
|
||||
|
||||
rv = initContext->webShell->QueryInterface(NS_GET_IID(nsIBaseWindow),
|
||||
getter_AddRefs(baseWindow));
|
||||
|
||||
if (NS_FAILED(rv)) {
|
||||
initContext->initFailCode = kShowWebShellError;
|
||||
return;
|
||||
}
|
||||
rv = baseWindow->SetVisibility(PR_TRUE);
|
||||
if (NS_FAILED(rv)) {
|
||||
initContext->initFailCode = kShowWebShellError;
|
||||
return;
|
||||
|
||||
@@ -29,7 +29,9 @@
|
||||
*/
|
||||
|
||||
#include "nsActions.h"
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIContentViewer.h"
|
||||
#include "nsIBaseWindow.h"
|
||||
|
||||
|
||||
void * handleEvent (PLEvent * event);
|
||||
@@ -91,17 +93,26 @@ wsResizeEvent::wsResizeEvent(nsIWebShell* webShell, PRInt32 x, PRInt32 y, PRInt3
|
||||
void *
|
||||
wsResizeEvent::handleEvent ()
|
||||
{
|
||||
if (mWebShell) {
|
||||
|
||||
printf("handleEvent(resize(x = %d y = %d w = %d h = %d))\n", mLeft, mBottom, mWidth, mHeight);
|
||||
|
||||
nsresult rv = mWebShell->SetBounds(mLeft, mBottom, mWidth, mHeight);
|
||||
|
||||
printf("result = %lx\n", rv);
|
||||
|
||||
return (void *) rv;
|
||||
nsresult rv = NS_ERROR_FAILURE;
|
||||
if (mWebShell) {
|
||||
|
||||
printf("handleEvent(resize(x = %d y = %d w = %d h = %d))\n", mLeft, mBottom, mWidth, mHeight);
|
||||
nsCOMPtr<nsIBaseWindow> baseWindow;
|
||||
|
||||
rv = mWebShell->QueryInterface(NS_GET_IID(nsIBaseWindow),
|
||||
getter_AddRefs(baseWindow));
|
||||
|
||||
if (NS_FAILED(rv)) {
|
||||
return NULL;
|
||||
}
|
||||
return NULL;
|
||||
rv = baseWindow->SetPositionAndSize(mLeft, mBottom, mWidth, mHeight,
|
||||
PR_TRUE);
|
||||
|
||||
printf("result = %lx\n", rv);
|
||||
|
||||
return (void *) rv;
|
||||
}
|
||||
return NULL;
|
||||
} // handleEvent()
|
||||
|
||||
|
||||
@@ -188,7 +199,16 @@ wsShowEvent::handleEvent ()
|
||||
|
||||
printf("handleEvent(Show))\n");
|
||||
|
||||
nsresult rv = mWebShell->Show();
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIBaseWindow> baseWindow;
|
||||
|
||||
rv = mWebShell->QueryInterface(NS_GET_IID(nsIBaseWindow),
|
||||
getter_AddRefs(baseWindow));
|
||||
|
||||
if (NS_FAILED(rv)) {
|
||||
return NULL;
|
||||
}
|
||||
baseWindow->SetVisibility(PR_TRUE);
|
||||
|
||||
printf("result = %lx\n", rv);
|
||||
}
|
||||
@@ -215,8 +235,17 @@ wsHideEvent::handleEvent ()
|
||||
|
||||
printf("handleEvent(Hide))\n");
|
||||
|
||||
nsresult rv = mWebShell->Hide();
|
||||
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIBaseWindow> baseWindow;
|
||||
|
||||
rv = mWebShell->QueryInterface(NS_GET_IID(nsIBaseWindow),
|
||||
getter_AddRefs(baseWindow));
|
||||
|
||||
if (NS_FAILED(rv)) {
|
||||
return NULL;
|
||||
}
|
||||
baseWindow->SetVisibility(PR_FALSE);
|
||||
|
||||
printf("result = %lx\n", rv);
|
||||
}
|
||||
return NULL;
|
||||
@@ -244,7 +273,16 @@ wsMoveToEvent::handleEvent ()
|
||||
|
||||
printf("handleEvent(MoveTo(%ld, %ld))\n", mX, mY);
|
||||
|
||||
nsresult rv = mWebShell->MoveTo(mX, mY);
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIBaseWindow> baseWindow;
|
||||
|
||||
rv = mWebShell->QueryInterface(NS_GET_IID(nsIBaseWindow),
|
||||
getter_AddRefs(baseWindow));
|
||||
|
||||
if (NS_FAILED(rv)) {
|
||||
return NULL;
|
||||
}
|
||||
rv = baseWindow->SetPosition(mX, mY);
|
||||
|
||||
printf("result = %lx\n", rv);
|
||||
}
|
||||
@@ -270,7 +308,16 @@ wsSetFocusEvent::handleEvent ()
|
||||
|
||||
printf("handleEvent(SetFocus())\n");
|
||||
|
||||
nsresult rv = mWebShell->SetFocus();
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIBaseWindow> baseWindow;
|
||||
|
||||
rv = mWebShell->QueryInterface(NS_GET_IID(nsIBaseWindow),
|
||||
getter_AddRefs(baseWindow));
|
||||
|
||||
if (NS_FAILED(rv)) {
|
||||
return NULL;
|
||||
}
|
||||
rv = baseWindow->SetFocus();
|
||||
|
||||
printf("result = %lx\n", rv);
|
||||
}
|
||||
@@ -325,7 +372,16 @@ wsRepaintEvent::handleEvent ()
|
||||
|
||||
printf("handleEvent(Repaint(%d))\n", mForceRepaint);
|
||||
|
||||
nsresult rv = mWebShell->Repaint(mForceRepaint);
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIBaseWindow> baseWindow;
|
||||
|
||||
rv = mWebShell->QueryInterface(NS_GET_IID(nsIBaseWindow),
|
||||
getter_AddRefs(baseWindow));
|
||||
|
||||
if (NS_FAILED(rv)) {
|
||||
return NULL;
|
||||
}
|
||||
rv = baseWindow->Repaint(mForceRepaint);
|
||||
|
||||
printf("result = %lx\n", rv);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user