Beginning to add visual mode.
git-svn-id: svn://10.0.0.236/trunk@1679 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -43,6 +43,7 @@
|
||||
#define VIEWER_DUMP_VIEWS 40024
|
||||
#define VIEWER_DUMP_STYLE 40025
|
||||
#define VIEWER_DEBUGROBOT 40026
|
||||
#define VIEWER_DEBUGROBOT_UPDATE 40027
|
||||
|
||||
// Note: must be in ascending sequential order
|
||||
#define VIEWER_ONE_COLUMN 40031
|
||||
|
||||
@@ -67,6 +67,7 @@ VIEWER MENU DISCARDABLE
|
||||
MENUITEM "Dump &Style", VIEWER_DUMP_STYLE
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Debu&g Robot", VIEWER_DEBUGROBOT
|
||||
MENUITEM "&Visual Debug Robot", VIEWER_DEBUGROBOT_UPDATE
|
||||
}
|
||||
POPUP "&Tools"
|
||||
{
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
#include "nsDocLoader.h"
|
||||
|
||||
// DebugRobot call
|
||||
extern "C" NS_EXPORT int DebugRobot(nsVoidArray * workList);
|
||||
extern "C" NS_EXPORT int DebugRobot(nsVoidArray * workList, nsIWebWidget * ww);
|
||||
|
||||
// Selection Repaint includes
|
||||
#include "nsIPresShell.h"
|
||||
@@ -379,6 +379,7 @@ long PASCAL
|
||||
WndProc(HWND hWnd, UINT msg, WPARAM param, LPARAM lparam)
|
||||
{
|
||||
HMENU hMenu;
|
||||
PRBool bVisual = PR_FALSE;
|
||||
|
||||
if (msg == WM_CREATE) {
|
||||
LPCREATESTRUCT lpcs = (LPCREATESTRUCT) lparam;
|
||||
@@ -462,6 +463,8 @@ WndProc(HWND hWnd, UINT msg, WPARAM param, LPARAM lparam)
|
||||
wd->ww->DumpStyle();
|
||||
}
|
||||
break;
|
||||
case VIEWER_DEBUGROBOT_UPDATE:
|
||||
bVisual = PR_TRUE;
|
||||
case VIEWER_DEBUGROBOT:
|
||||
if ((nsnull != wd) && (nsnull != wd->ww)) {
|
||||
nsIDocument* doc = wd->ww->GetDocument();
|
||||
@@ -469,7 +472,7 @@ WndProc(HWND hWnd, UINT msg, WPARAM param, LPARAM lparam)
|
||||
const char * str = doc->GetDocumentURL()->GetSpec();
|
||||
nsVoidArray * gWorkList = new nsVoidArray();
|
||||
gWorkList->AppendElement(new nsString(str));
|
||||
DebugRobot(gWorkList);
|
||||
DebugRobot(gWorkList, bVisual ? wd->ww : nsnull);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user