From eab4da2c100a0376f51dad4bf3c8b2c40387d2c8 Mon Sep 17 00:00:00 2001 From: jevering Date: Thu, 14 May 1998 22:16:51 +0000 Subject: [PATCH] Adding visual mode. git-svn-id: svn://10.0.0.236/trunk@1680 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/htmlparser/robot/nsDebugRobot.cpp | 5 ++++- mozilla/htmlparser/robot/test/RobotMain.cpp | 5 +++-- mozilla/parser/htmlparser/robot/nsDebugRobot.cpp | 5 ++++- mozilla/parser/htmlparser/robot/test/RobotMain.cpp | 5 +++-- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/mozilla/htmlparser/robot/nsDebugRobot.cpp b/mozilla/htmlparser/robot/nsDebugRobot.cpp index 7b1b61a7624..88d15ffa0e0 100644 --- a/mozilla/htmlparser/robot/nsDebugRobot.cpp +++ b/mozilla/htmlparser/robot/nsDebugRobot.cpp @@ -18,6 +18,7 @@ #include "nsIRobotSink.h" #include "nsIRobotSinkObserver.h" #include "nsIParser.h" +#include "nsIWebWidget.h" #include "nsVoidArray.h" #include "nsString.h" #include "nsIURL.h" @@ -93,7 +94,7 @@ NS_IMETHODIMP RobotSinkObserver::ProcessLink(const nsString& aURLSpec) //---------------------------------------------------------------------- -extern "C" NS_EXPORT int DebugRobot(nsVoidArray * workList) +extern "C" NS_EXPORT int DebugRobot(nsVoidArray * workList, nsIWebWidget * ww) { if (nsnull==workList) return -1; @@ -141,6 +142,8 @@ extern "C" NS_EXPORT int DebugRobot(nsVoidArray * workList) parser->SetContentSink(sink); parser->Parse(url); + if (ww) + ww->LoadURL(url->GetSpec()); NS_RELEASE(sink); NS_RELEASE(parser); NS_RELEASE(url); diff --git a/mozilla/htmlparser/robot/test/RobotMain.cpp b/mozilla/htmlparser/robot/test/RobotMain.cpp index 5cd699bcb7f..e57c8f43148 100644 --- a/mozilla/htmlparser/robot/test/RobotMain.cpp +++ b/mozilla/htmlparser/robot/test/RobotMain.cpp @@ -1,8 +1,9 @@ #include #include "nsVoidArray.h" +#include "nsIWebWidget.h" #include "nsString.h" -extern "C" NS_EXPORT int DebugRobot(nsVoidArray * workList); +extern "C" NS_EXPORT int DebugRobot(nsVoidArray * workList, nsIWebWidget * ww); int main(int argc, char **argv) { @@ -11,6 +12,6 @@ int main(int argc, char **argv) for (i = 1; i < argc; i++) { gWorkList->AppendElement(new nsString(argv[i])); } - return DebugRobot(gWorkList); + return DebugRobot(gWorkList, nsnull); } diff --git a/mozilla/parser/htmlparser/robot/nsDebugRobot.cpp b/mozilla/parser/htmlparser/robot/nsDebugRobot.cpp index 7b1b61a7624..88d15ffa0e0 100644 --- a/mozilla/parser/htmlparser/robot/nsDebugRobot.cpp +++ b/mozilla/parser/htmlparser/robot/nsDebugRobot.cpp @@ -18,6 +18,7 @@ #include "nsIRobotSink.h" #include "nsIRobotSinkObserver.h" #include "nsIParser.h" +#include "nsIWebWidget.h" #include "nsVoidArray.h" #include "nsString.h" #include "nsIURL.h" @@ -93,7 +94,7 @@ NS_IMETHODIMP RobotSinkObserver::ProcessLink(const nsString& aURLSpec) //---------------------------------------------------------------------- -extern "C" NS_EXPORT int DebugRobot(nsVoidArray * workList) +extern "C" NS_EXPORT int DebugRobot(nsVoidArray * workList, nsIWebWidget * ww) { if (nsnull==workList) return -1; @@ -141,6 +142,8 @@ extern "C" NS_EXPORT int DebugRobot(nsVoidArray * workList) parser->SetContentSink(sink); parser->Parse(url); + if (ww) + ww->LoadURL(url->GetSpec()); NS_RELEASE(sink); NS_RELEASE(parser); NS_RELEASE(url); diff --git a/mozilla/parser/htmlparser/robot/test/RobotMain.cpp b/mozilla/parser/htmlparser/robot/test/RobotMain.cpp index 5cd699bcb7f..e57c8f43148 100644 --- a/mozilla/parser/htmlparser/robot/test/RobotMain.cpp +++ b/mozilla/parser/htmlparser/robot/test/RobotMain.cpp @@ -1,8 +1,9 @@ #include #include "nsVoidArray.h" +#include "nsIWebWidget.h" #include "nsString.h" -extern "C" NS_EXPORT int DebugRobot(nsVoidArray * workList); +extern "C" NS_EXPORT int DebugRobot(nsVoidArray * workList, nsIWebWidget * ww); int main(int argc, char **argv) { @@ -11,6 +12,6 @@ int main(int argc, char **argv) for (i = 1; i < argc; i++) { gWorkList->AppendElement(new nsString(argv[i])); } - return DebugRobot(gWorkList); + return DebugRobot(gWorkList, nsnull); }