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);
}