From 264c89e73a19a33f9d2ec6eec5b981036675cb37 Mon Sep 17 00:00:00 2001 From: "tbogard%aol.net" Date: Wed, 29 Mar 2000 06:13:07 +0000 Subject: [PATCH] A docshell is now passed in. Use the nsIWebNavigation for loading an URL rather than nsIWebShell::LoadURL. git-svn-id: svn://10.0.0.236/trunk@64460 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/htmlparser/robot/nsDebugRobot.cpp | 12 ++++++++---- mozilla/parser/htmlparser/robot/nsDebugRobot.cpp | 12 ++++++++---- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/mozilla/htmlparser/robot/nsDebugRobot.cpp b/mozilla/htmlparser/robot/nsDebugRobot.cpp index 0740cc09bb5..1ec79852215 100644 --- a/mozilla/htmlparser/robot/nsDebugRobot.cpp +++ b/mozilla/htmlparser/robot/nsDebugRobot.cpp @@ -23,6 +23,8 @@ #include "nsIRobotSink.h" #include "nsIRobotSinkObserver.h" #include "nsIParser.h" +#include "nsIDocShell.h" +#include "nsIWebNavigation.h" #include "nsIWebShell.h" #include "nsIDocumentLoader.h" #include "nsIDocumentLoaderObserver.h" @@ -204,7 +206,7 @@ extern "C" NS_EXPORT void DumpVectorRecord(void); //---------------------------------------------------------------------- extern "C" NS_EXPORT int DebugRobot( nsVoidArray * workList, - nsIWebShell * ww, + nsIDocShell * docShell, int iMaxLoads, char * verify_dir, void (*yieldProc )(const char *) @@ -315,10 +317,11 @@ extern "C" NS_EXPORT int DebugRobot( } } g_bReadyForNextUrl = PR_FALSE; - if (ww) { + if (docShell) { nsIDocumentLoader *docLoader; - ww->GetDocumentLoader(docLoader); + nsCOMPtr webShell(do_QueryInterface(docShell)); + webShell->GetDocumentLoader(docLoader); if (docLoader) { docLoader->AddObserver(pl); NS_RELEASE(docLoader); @@ -327,7 +330,8 @@ extern "C" NS_EXPORT int DebugRobot( (void)url->GetSpec(&spec); nsAutoString theSpec(spec); nsCRT::free(spec); - ww->LoadURL(theSpec.GetUnicode());/* XXX hook up stream listener here! */ + nsCOMPtr webNav(do_QueryInterface(docShell)); + webNav->LoadURI(theSpec.GetUnicode());/* XXX hook up stream listener here! */ while (!g_bReadyForNextUrl) { if (yieldProc != NULL) { (void)url->GetSpec(&spec); diff --git a/mozilla/parser/htmlparser/robot/nsDebugRobot.cpp b/mozilla/parser/htmlparser/robot/nsDebugRobot.cpp index 0740cc09bb5..1ec79852215 100644 --- a/mozilla/parser/htmlparser/robot/nsDebugRobot.cpp +++ b/mozilla/parser/htmlparser/robot/nsDebugRobot.cpp @@ -23,6 +23,8 @@ #include "nsIRobotSink.h" #include "nsIRobotSinkObserver.h" #include "nsIParser.h" +#include "nsIDocShell.h" +#include "nsIWebNavigation.h" #include "nsIWebShell.h" #include "nsIDocumentLoader.h" #include "nsIDocumentLoaderObserver.h" @@ -204,7 +206,7 @@ extern "C" NS_EXPORT void DumpVectorRecord(void); //---------------------------------------------------------------------- extern "C" NS_EXPORT int DebugRobot( nsVoidArray * workList, - nsIWebShell * ww, + nsIDocShell * docShell, int iMaxLoads, char * verify_dir, void (*yieldProc )(const char *) @@ -315,10 +317,11 @@ extern "C" NS_EXPORT int DebugRobot( } } g_bReadyForNextUrl = PR_FALSE; - if (ww) { + if (docShell) { nsIDocumentLoader *docLoader; - ww->GetDocumentLoader(docLoader); + nsCOMPtr webShell(do_QueryInterface(docShell)); + webShell->GetDocumentLoader(docLoader); if (docLoader) { docLoader->AddObserver(pl); NS_RELEASE(docLoader); @@ -327,7 +330,8 @@ extern "C" NS_EXPORT int DebugRobot( (void)url->GetSpec(&spec); nsAutoString theSpec(spec); nsCRT::free(spec); - ww->LoadURL(theSpec.GetUnicode());/* XXX hook up stream listener here! */ + nsCOMPtr webNav(do_QueryInterface(docShell)); + webNav->LoadURI(theSpec.GetUnicode());/* XXX hook up stream listener here! */ while (!g_bReadyForNextUrl) { if (yieldProc != NULL) { (void)url->GetSpec(&spec);