From 6c8a79d72b127de16b668c92e2af5ee86cb00555 Mon Sep 17 00:00:00 2001 From: "rpotts%netscape.com" Date: Wed, 29 Dec 1999 05:10:21 +0000 Subject: [PATCH] Removed obsolete method nsIDocumentLoader::LoadOpenedDocument. git-svn-id: svn://10.0.0.236/trunk@56596 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/docshell/base/nsWebShell.cpp | 10 +------- mozilla/uriloader/base/nsDocLoader.cpp | 28 +++++---------------- mozilla/webshell/public/nsIDocumentLoader.h | 10 -------- mozilla/webshell/src/nsDocLoader.cpp | 28 +++++---------------- mozilla/webshell/src/nsWebShell.cpp | 10 +------- 5 files changed, 14 insertions(+), 72 deletions(-) diff --git a/mozilla/docshell/base/nsWebShell.cpp b/mozilla/docshell/base/nsWebShell.cpp index cc438bed8e3..611eb3c65e7 100644 --- a/mozilla/docshell/base/nsWebShell.cpp +++ b/mozilla/docshell/base/nsWebShell.cpp @@ -1730,19 +1730,11 @@ nsWebShell::DoContent(const char * aContentType, // own load group!!! So the request would get canceled out from under us... // after retargeting we may be able to safely call DoLoadURL. DoLoadURL(aUri, strCommand, nsnull, nsIChannel::LOAD_NORMAL, 0, nsnull, PR_FALSE); -#if 0 - return mDocLoader->LoadOpenedDocument(aOpenedChannel, - strCommand, - (nsIWebShell*)this, - nsnull, - nsnull, - aContentHandler); -#else + return CreateViewer(aOpenedChannel, aContentType, strCommand, aContentHandler); -#endif } static NS_DEFINE_IID(kIDocumentLoaderFactoryIID, NS_IDOCUMENTLOADERFACTORY_IID); diff --git a/mozilla/uriloader/base/nsDocLoader.cpp b/mozilla/uriloader/base/nsDocLoader.cpp index cf339b41e94..d4244248a58 100644 --- a/mozilla/uriloader/base/nsDocLoader.cpp +++ b/mozilla/uriloader/base/nsDocLoader.cpp @@ -117,13 +117,6 @@ public: NS_DECL_ISUPPORTS - NS_IMETHOD LoadOpenedDocument(nsIChannel * aOpenedChannel, - const char * aCommand, - nsIContentViewerContainer *aContainer, - nsIInputStream * aPostDataStream, - nsIURI * aReffererUrl, - nsIStreamListener ** aContentHandler); - // nsIDocumentLoader interface NS_IMETHOD LoadDocument(nsIURI * aUri, const char *aCommand, @@ -347,18 +340,6 @@ nsDocLoaderImpl::CreateDocumentLoader(nsIDocumentLoader** anInstance) return rv; } -NS_IMETHODIMP -nsDocLoaderImpl::LoadOpenedDocument(nsIChannel * aOpenedChannel, - const char * aCommand, - nsIContentViewerContainer *aContainer, - nsIInputStream * aPostDataStream, - nsIURI * aReffererUrl, - nsIStreamListener ** aContentHandler) -{ - NS_ASSERTION(0, "This method is OBSOLETE!!"); - return NS_ERROR_FAILURE; -} - static NS_DEFINE_CID(kURILoaderCID, NS_URI_LOADER_CID); @@ -422,9 +403,12 @@ nsDocLoaderImpl::LoadDocument(nsIURI * aUri, mLoadGroup, getter_AddRefs(openContext)); - if (openContext) { - mLoadGroup = do_QueryInterface(openContext); - } +// I think that this is wrong... Do *not* destroy the loadGroup assosicated +// with a DocLoader if the URI is retargeted!! The DocLoader does not care. +// +/// if (openContext) { +/// mLoadGroup = do_QueryInterface(openContext); +/// } } return rv; diff --git a/mozilla/webshell/public/nsIDocumentLoader.h b/mozilla/webshell/public/nsIDocumentLoader.h index 1c9de13ee94..3f795b7668a 100644 --- a/mozilla/webshell/public/nsIDocumentLoader.h +++ b/mozilla/webshell/public/nsIDocumentLoader.h @@ -97,16 +97,6 @@ class nsIDocumentLoader : public nsISupports public: NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOCUMENTLOADER_IID) - // url dispatching shortcut method....we return the - // doc bind info in the form of a stream listener - // which we'll use to feed data into the content viewer - NS_IMETHOD LoadOpenedDocument(nsIChannel * aOpenedChannel, - const char * aCommand, - nsIContentViewerContainer *aContainer, - nsIInputStream * aPostDataStream, - nsIURI * aReffererUrl, - nsIStreamListener ** aContentHandler) = 0; - NS_IMETHOD LoadDocument(nsIURI * aUri, const char* aCommand, nsISupports* aContainer, diff --git a/mozilla/webshell/src/nsDocLoader.cpp b/mozilla/webshell/src/nsDocLoader.cpp index cf339b41e94..d4244248a58 100644 --- a/mozilla/webshell/src/nsDocLoader.cpp +++ b/mozilla/webshell/src/nsDocLoader.cpp @@ -117,13 +117,6 @@ public: NS_DECL_ISUPPORTS - NS_IMETHOD LoadOpenedDocument(nsIChannel * aOpenedChannel, - const char * aCommand, - nsIContentViewerContainer *aContainer, - nsIInputStream * aPostDataStream, - nsIURI * aReffererUrl, - nsIStreamListener ** aContentHandler); - // nsIDocumentLoader interface NS_IMETHOD LoadDocument(nsIURI * aUri, const char *aCommand, @@ -347,18 +340,6 @@ nsDocLoaderImpl::CreateDocumentLoader(nsIDocumentLoader** anInstance) return rv; } -NS_IMETHODIMP -nsDocLoaderImpl::LoadOpenedDocument(nsIChannel * aOpenedChannel, - const char * aCommand, - nsIContentViewerContainer *aContainer, - nsIInputStream * aPostDataStream, - nsIURI * aReffererUrl, - nsIStreamListener ** aContentHandler) -{ - NS_ASSERTION(0, "This method is OBSOLETE!!"); - return NS_ERROR_FAILURE; -} - static NS_DEFINE_CID(kURILoaderCID, NS_URI_LOADER_CID); @@ -422,9 +403,12 @@ nsDocLoaderImpl::LoadDocument(nsIURI * aUri, mLoadGroup, getter_AddRefs(openContext)); - if (openContext) { - mLoadGroup = do_QueryInterface(openContext); - } +// I think that this is wrong... Do *not* destroy the loadGroup assosicated +// with a DocLoader if the URI is retargeted!! The DocLoader does not care. +// +/// if (openContext) { +/// mLoadGroup = do_QueryInterface(openContext); +/// } } return rv; diff --git a/mozilla/webshell/src/nsWebShell.cpp b/mozilla/webshell/src/nsWebShell.cpp index cc438bed8e3..611eb3c65e7 100644 --- a/mozilla/webshell/src/nsWebShell.cpp +++ b/mozilla/webshell/src/nsWebShell.cpp @@ -1730,19 +1730,11 @@ nsWebShell::DoContent(const char * aContentType, // own load group!!! So the request would get canceled out from under us... // after retargeting we may be able to safely call DoLoadURL. DoLoadURL(aUri, strCommand, nsnull, nsIChannel::LOAD_NORMAL, 0, nsnull, PR_FALSE); -#if 0 - return mDocLoader->LoadOpenedDocument(aOpenedChannel, - strCommand, - (nsIWebShell*)this, - nsnull, - nsnull, - aContentHandler); -#else + return CreateViewer(aOpenedChannel, aContentType, strCommand, aContentHandler); -#endif } static NS_DEFINE_IID(kIDocumentLoaderFactoryIID, NS_IDOCUMENTLOADERFACTORY_IID);