From 5870fbf96d41900a23e6593cf26c496f3aea86e1 Mon Sep 17 00:00:00 2001 From: "rpotts%netscape.com" Date: Wed, 29 Dec 1999 07:32:59 +0000 Subject: [PATCH] Removed obsolete arguments from nsIDocumentLoaderObserver OnEndDocumentLoad and OnStartURLLoad. git-svn-id: svn://10.0.0.236/trunk@56597 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/docshell/base/nsDocShell.cpp | 12 ++--- mozilla/docshell/base/nsDocShell.h | 3 +- mozilla/docshell/base/nsWebShell.cpp | 24 ++++----- mozilla/editor/base/nsEditorShell.cpp | 6 +-- mozilla/editor/base/nsEditorShell.h | 6 +-- mozilla/editor/composer/src/nsEditorShell.cpp | 6 +-- mozilla/editor/composer/src/nsEditorShell.h | 6 +-- .../activex/src/control/WebShellContainer.cpp | 4 +- .../activex/src/control/WebShellContainer.h | 4 +- mozilla/extensions/pics/src/nsPICS.cpp | 11 ++-- .../extensions/wallet/src/nsWalletService.cpp | 5 +- .../extensions/wallet/src/nsWalletService.h | 5 +- .../xmlterm/base/mozXMLTerminal.cpp | 6 +-- .../extensions/xmlterm/base/mozXMLTerminal.h | 6 +-- mozilla/htmlparser/robot/nsDebugRobot.cpp | 12 ++--- .../html/forms/src/nsGfxTextControlFrame.cpp | 6 +-- .../html/forms/src/nsGfxTextControlFrame.h | 6 +-- .../embedding/powerplant/source/CWebShell.h | 6 +-- .../mailnews/base/src/nsMsgStatusFeedback.cpp | 5 +- .../mailnews/base/src/nsMsgStatusFeedback.h | 4 +- .../parser/htmlparser/robot/nsDebugRobot.cpp | 12 ++--- mozilla/uriloader/base/nsDocLoader.cpp | 53 +++++-------------- .../embed/ActiveX/WebShellContainer.cpp | 4 +- .../embed/ActiveX/WebShellContainer.h | 4 +- .../public/nsIDocumentLoaderObserver.h | 6 +-- mozilla/webshell/src/nsDocLoader.cpp | 53 +++++-------------- mozilla/webshell/src/nsWebShell.cpp | 24 ++++----- .../webshell/tests/viewer/nsBrowserWindow.cpp | 6 +-- .../webshell/tests/viewer/nsBrowserWindow.h | 6 +-- .../webshell/tests/viewer/nsWebCrawler.cpp | 6 +-- mozilla/webshell/tests/viewer/nsWebCrawler.h | 6 +-- .../xpfe/appshell/src/nsWebShellWindow.cpp | 6 +-- mozilla/xpfe/appshell/src/nsWebShellWindow.h | 4 +- .../xpfe/browser/src/nsBrowserInstance.cpp | 11 ++-- mozilla/xpfe/browser/src/nsBrowserInstance.h | 4 +- 35 files changed, 118 insertions(+), 230 deletions(-) diff --git a/mozilla/docshell/base/nsDocShell.cpp b/mozilla/docshell/base/nsDocShell.cpp index ce0753176cf..b27d83376a1 100644 --- a/mozilla/docshell/base/nsDocShell.cpp +++ b/mozilla/docshell/base/nsDocShell.cpp @@ -280,11 +280,7 @@ nsDocShell::SetDocument(nsIDOMDocument *aDOMDoc, nsIDOMElement *aRootNode) // (7) fire end document load notification nsresult rv = NS_OK; - nsCOMPtr dlObserver; - // XXX: this was just "this", and webshell container relied on getting a webshell - // through this interface. No one else uses it anywhere afaict - //if (!dlObserver) { return NS_ERROR_NO_INTERFACE; } - NS_ENSURE_SUCCESS(FireEndDocumentLoad(mDocLoader, dummyChannel, rv, dlObserver), NS_ERROR_FAILURE); + NS_ENSURE_SUCCESS(FireEndDocumentLoad(mDocLoader, dummyChannel, rv), NS_ERROR_FAILURE); NS_ENSURE_SUCCESS(rv, NS_ERROR_FAILURE); // test the resulting out-param separately return NS_OK; @@ -1812,12 +1808,10 @@ nsDocShell::FireStartDocumentLoad(nsIDocumentLoader* aLoader, NS_IMETHODIMP nsDocShell::FireEndDocumentLoad(nsIDocumentLoader* aLoader, nsIChannel * aChannel, - nsresult aStatus, - nsIDocumentLoaderObserver * aDocLoadObserver) + nsresult aStatus) { NS_ENSURE_ARG_POINTER(aLoader); NS_ENSURE_ARG_POINTER(aChannel); - // null aDocLoadObserver is legal nsCOMPtr aURL; NS_ENSURE_SUCCESS(aChannel->GetURI(getter_AddRefs(aURL)), NS_ERROR_FAILURE); @@ -1894,7 +1888,7 @@ nsDocShell::FireEndDocumentLoad(nsIDocumentLoader* aLoader, * Fire the OnEndDocumentLoad of the DocLoaderobserver */ if (dlObserver && aURL) { - NS_ENSURE_SUCCESS(dlObserver->OnEndDocumentLoad(mDocLoader, aChannel, aStatus, aDocLoadObserver), + NS_ENSURE_SUCCESS(dlObserver->OnEndDocumentLoad(mDocLoader, aChannel, aStatus), NS_ERROR_FAILURE); } diff --git a/mozilla/docshell/base/nsDocShell.h b/mozilla/docshell/base/nsDocShell.h index 2890972bb16..b90dbeb4b83 100644 --- a/mozilla/docshell/base/nsDocShell.h +++ b/mozilla/docshell/base/nsDocShell.h @@ -121,8 +121,7 @@ protected: NS_IMETHOD FireEndDocumentLoad(nsIDocumentLoader* aLoader, nsIChannel* aChannel, - nsresult aStatus, - nsIDocumentLoaderObserver * aObserver); + nsresult aStatus); NS_IMETHOD InsertDocumentInDocTree(); NS_IMETHOD DestroyChildren(); diff --git a/mozilla/docshell/base/nsWebShell.cpp b/mozilla/docshell/base/nsWebShell.cpp index 611eb3c65e7..55b33eb3352 100644 --- a/mozilla/docshell/base/nsWebShell.cpp +++ b/mozilla/docshell/base/nsWebShell.cpp @@ -311,11 +311,9 @@ public: const char* aCommand); NS_IMETHOD OnEndDocumentLoad(nsIDocumentLoader* loader, nsIChannel* channel, - nsresult aStatus, - nsIDocumentLoaderObserver * ); + nsresult aStatus); NS_IMETHOD OnStartURLLoad(nsIDocumentLoader* loader, - nsIChannel* channel, - nsIContentViewer* aViewer); + nsIChannel* channel); NS_IMETHOD OnProgressURLLoad(nsIDocumentLoader* loader, nsIChannel* channel, PRUint32 aProgress, PRUint32 aProgressMax); @@ -1574,7 +1572,7 @@ nsWebShell::DoLoadURL(nsIURI * aUri, mReferrer = aReferrer; } // Pass on status of scrolling/anchor visit to docloaderobserver - rv = OnEndDocumentLoad(mDocLoader, dummyChannel, rv, this); + rv = OnEndDocumentLoad(mDocLoader, dummyChannel, rv); return rv; } else if (aType == nsISessionHistory::LOAD_HISTORY) @@ -1594,14 +1592,14 @@ nsWebShell::DoLoadURL(nsIURI * aUri, } mProcessedEndDocumentLoad = PR_FALSE; // Pass on status of scrolling/anchor visit to docloaderobserver - rv = OnEndDocumentLoad(mDocLoader, dummyChannel, rv, this); + rv = OnEndDocumentLoad(mDocLoader, dummyChannel, rv); return rv; } } #if 0 mProcessedEndDocumentLoad = PR_FALSE; // Pass on status of scrolling/anchor visit to docloaderobserver - rv = OnEndDocumentLoad(mDocLoader, dummyChannel, rv, this); + rv = OnEndDocumentLoad(mDocLoader, dummyChannel, rv); return rv; #endif /* 0 */ } // NS_SUCCEEDED(rv) && presShell @@ -2950,8 +2948,7 @@ nsWebShell::OnStartDocumentLoad(nsIDocumentLoader* loader, NS_IMETHODIMP nsWebShell::OnEndDocumentLoad(nsIDocumentLoader* loader, nsIChannel* channel, - nsresult aStatus, - nsIDocumentLoaderObserver * aWebShell) + nsresult aStatus) { #ifdef MOZ_PERF_METRICS MOZ_TIMER_DEBUGLOG(("Stop: nsWebShell::OnEndDocumentLoad(), this=%p\n", this)); @@ -3041,7 +3038,7 @@ nsWebShell::OnEndDocumentLoad(nsIDocumentLoader* loader, * Fire the OnEndDocumentLoad of the DocLoaderobserver */ if (dlObserver && (nsnull != aURL)) { - dlObserver->OnEndDocumentLoad(mDocLoader, channel, aStatus, aWebShell); + dlObserver->OnEndDocumentLoad(mDocLoader, channel, aStatus); } if ( (mDocLoader == loader) && (aStatus == NS_ERROR_UNKNOWN_HOST) ) { @@ -3107,8 +3104,7 @@ nsWebShell::OnEndDocumentLoad(nsIDocumentLoader* loader, NS_IMETHODIMP nsWebShell::OnStartURLLoad(nsIDocumentLoader* loader, - nsIChannel* channel, - nsIContentViewer* aViewer) + nsIChannel* channel) { nsresult rv; @@ -3129,7 +3125,7 @@ nsWebShell::OnStartURLLoad(nsIDocumentLoader* loader, */ if ((nsnull != mContainer) && (nsnull != mDocLoaderObserver)) { - mDocLoaderObserver->OnStartURLLoad(mDocLoader, channel, aViewer); + mDocLoaderObserver->OnStartURLLoad(mDocLoader, channel); } return NS_OK; } @@ -4016,7 +4012,7 @@ NS_IMETHODIMP nsWebShell::SetDocument(nsIDOMDocument *aDOMDoc, // (7) fire end document load notification mProcessedEndDocumentLoad = PR_FALSE; nsresult rv = NS_OK; - NS_ENSURE_SUCCESS(OnEndDocumentLoad(mDocLoader, dummyChannel, rv, this), NS_ERROR_FAILURE); + NS_ENSURE_SUCCESS(OnEndDocumentLoad(mDocLoader, dummyChannel, rv), NS_ERROR_FAILURE); NS_ENSURE_SUCCESS(rv, NS_ERROR_FAILURE); // test the resulting out-param separately return NS_OK; diff --git a/mozilla/editor/base/nsEditorShell.cpp b/mozilla/editor/base/nsEditorShell.cpp index ab9a242a023..12ad409c47d 100644 --- a/mozilla/editor/base/nsEditorShell.cpp +++ b/mozilla/editor/base/nsEditorShell.cpp @@ -3601,8 +3601,7 @@ nsEditorShell::OnStartDocumentLoad(nsIDocumentLoader* loader, nsIURI* aURL, cons } NS_IMETHODIMP -nsEditorShell::OnEndDocumentLoad(nsIDocumentLoader* loader, nsIChannel* channel, nsresult aStatus, - nsIDocumentLoaderObserver * aObserver) +nsEditorShell::OnEndDocumentLoad(nsIDocumentLoader* loader, nsIChannel* channel, nsresult aStatus) { // for pages with charsets, this gets called the first time with a // non-zero status value. Don't prepare the editor that time. @@ -3620,8 +3619,7 @@ nsEditorShell::OnEndDocumentLoad(nsIDocumentLoader* loader, nsIChannel* channel, NS_IMETHODIMP nsEditorShell::OnStartURLLoad(nsIDocumentLoader* loader, - nsIChannel* channel, - nsIContentViewer* aViewer) + nsIChannel* channel) { return NS_OK; diff --git a/mozilla/editor/base/nsEditorShell.h b/mozilla/editor/base/nsEditorShell.h index 1e97936d198..d52a280f8ec 100644 --- a/mozilla/editor/base/nsEditorShell.h +++ b/mozilla/editor/base/nsEditorShell.h @@ -93,10 +93,8 @@ class nsEditorShell : public nsIEditorShell, // nsIDocumentLoaderObserver NS_IMETHOD OnStartDocumentLoad(nsIDocumentLoader* loader, nsIURI* aURL, const char* aCommand); - NS_IMETHOD OnEndDocumentLoad(nsIDocumentLoader* loader, nsIChannel* channel, nsresult aStatus, - nsIDocumentLoaderObserver * aObserver); - NS_IMETHOD OnStartURLLoad(nsIDocumentLoader* loader, nsIChannel* channel, - nsIContentViewer* aViewer); + NS_IMETHOD OnEndDocumentLoad(nsIDocumentLoader* loader, nsIChannel* channel, nsresult aStatus); + NS_IMETHOD OnStartURLLoad(nsIDocumentLoader* loader, nsIChannel* channel); NS_IMETHOD OnProgressURLLoad(nsIDocumentLoader* loader, nsIChannel* channel, PRUint32 aProgress, PRUint32 aProgressMax); NS_IMETHOD OnStatusURLLoad(nsIDocumentLoader* loader, nsIChannel* channel, nsString& aMsg); diff --git a/mozilla/editor/composer/src/nsEditorShell.cpp b/mozilla/editor/composer/src/nsEditorShell.cpp index ab9a242a023..12ad409c47d 100644 --- a/mozilla/editor/composer/src/nsEditorShell.cpp +++ b/mozilla/editor/composer/src/nsEditorShell.cpp @@ -3601,8 +3601,7 @@ nsEditorShell::OnStartDocumentLoad(nsIDocumentLoader* loader, nsIURI* aURL, cons } NS_IMETHODIMP -nsEditorShell::OnEndDocumentLoad(nsIDocumentLoader* loader, nsIChannel* channel, nsresult aStatus, - nsIDocumentLoaderObserver * aObserver) +nsEditorShell::OnEndDocumentLoad(nsIDocumentLoader* loader, nsIChannel* channel, nsresult aStatus) { // for pages with charsets, this gets called the first time with a // non-zero status value. Don't prepare the editor that time. @@ -3620,8 +3619,7 @@ nsEditorShell::OnEndDocumentLoad(nsIDocumentLoader* loader, nsIChannel* channel, NS_IMETHODIMP nsEditorShell::OnStartURLLoad(nsIDocumentLoader* loader, - nsIChannel* channel, - nsIContentViewer* aViewer) + nsIChannel* channel) { return NS_OK; diff --git a/mozilla/editor/composer/src/nsEditorShell.h b/mozilla/editor/composer/src/nsEditorShell.h index 1e97936d198..d52a280f8ec 100644 --- a/mozilla/editor/composer/src/nsEditorShell.h +++ b/mozilla/editor/composer/src/nsEditorShell.h @@ -93,10 +93,8 @@ class nsEditorShell : public nsIEditorShell, // nsIDocumentLoaderObserver NS_IMETHOD OnStartDocumentLoad(nsIDocumentLoader* loader, nsIURI* aURL, const char* aCommand); - NS_IMETHOD OnEndDocumentLoad(nsIDocumentLoader* loader, nsIChannel* channel, nsresult aStatus, - nsIDocumentLoaderObserver * aObserver); - NS_IMETHOD OnStartURLLoad(nsIDocumentLoader* loader, nsIChannel* channel, - nsIContentViewer* aViewer); + NS_IMETHOD OnEndDocumentLoad(nsIDocumentLoader* loader, nsIChannel* channel, nsresult aStatus); + NS_IMETHOD OnStartURLLoad(nsIDocumentLoader* loader, nsIChannel* channel); NS_IMETHOD OnProgressURLLoad(nsIDocumentLoader* loader, nsIChannel* channel, PRUint32 aProgress, PRUint32 aProgressMax); NS_IMETHOD OnStatusURLLoad(nsIDocumentLoader* loader, nsIChannel* channel, nsString& aMsg); diff --git a/mozilla/embedding/browser/activex/src/control/WebShellContainer.cpp b/mozilla/embedding/browser/activex/src/control/WebShellContainer.cpp index fac24915c68..cf2c2c88cd4 100644 --- a/mozilla/embedding/browser/activex/src/control/WebShellContainer.cpp +++ b/mozilla/embedding/browser/activex/src/control/WebShellContainer.cpp @@ -517,7 +517,7 @@ CWebShellContainer::OnStartDocumentLoad(nsIDocumentLoader* loader, nsIURI* aURL, // we need this to fire the document complete NS_IMETHODIMP -CWebShellContainer::OnEndDocumentLoad(nsIDocumentLoader* loader, nsIChannel *aChannel, nsresult aStatus, nsIDocumentLoaderObserver * aObserver) +CWebShellContainer::OnEndDocumentLoad(nsIDocumentLoader* loader, nsIChannel *aChannel, nsresult aStatus) { NG_TRACE(_T("CWebShellContainer::OnEndDocumentLoad(..., \"\")\n")); @@ -556,7 +556,7 @@ CWebShellContainer::OnEndDocumentLoad(nsIDocumentLoader* loader, nsIChannel *aCh } NS_IMETHODIMP -CWebShellContainer::OnStartURLLoad(nsIDocumentLoader* loader, nsIChannel* aChannel, nsIContentViewer* aViewer) +CWebShellContainer::OnStartURLLoad(nsIDocumentLoader* loader, nsIChannel* aChannel) { NG_TRACE(_T("CWebShellContainer::OnStartURLLoad(..., \"\")\n")); diff --git a/mozilla/embedding/browser/activex/src/control/WebShellContainer.h b/mozilla/embedding/browser/activex/src/control/WebShellContainer.h index 6d52dc77d81..fa5b0a5030e 100644 --- a/mozilla/embedding/browser/activex/src/control/WebShellContainer.h +++ b/mozilla/embedding/browser/activex/src/control/WebShellContainer.h @@ -100,8 +100,8 @@ public: // nsIDocumentLoaderObserver NS_IMETHOD OnStartDocumentLoad(nsIDocumentLoader* loader, nsIURI* aURL, const char* aCommand); - NS_IMETHOD OnEndDocumentLoad(nsIDocumentLoader* loader, nsIChannel* channel, nsresult aStatus, nsIDocumentLoaderObserver* aObserver); - NS_IMETHOD OnStartURLLoad(nsIDocumentLoader* loader, nsIChannel* channel, nsIContentViewer* aViewer); + NS_IMETHOD OnEndDocumentLoad(nsIDocumentLoader* loader, nsIChannel* channel, nsresult aStatus); + NS_IMETHOD OnStartURLLoad(nsIDocumentLoader* loader, nsIChannel* channel); NS_IMETHOD OnProgressURLLoad(nsIDocumentLoader* loader, nsIChannel* channel, PRUint32 aProgress, PRUint32 aProgressMax); NS_IMETHOD OnStatusURLLoad(nsIDocumentLoader* loader, nsIChannel* channel, nsString& aMsg); NS_IMETHOD OnEndURLLoad(nsIDocumentLoader* loader, nsIChannel* channel, nsresult aStatus); diff --git a/mozilla/extensions/pics/src/nsPICS.cpp b/mozilla/extensions/pics/src/nsPICS.cpp index b143855cb99..f120ab83c57 100644 --- a/mozilla/extensions/pics/src/nsPICS.cpp +++ b/mozilla/extensions/pics/src/nsPICS.cpp @@ -145,8 +145,8 @@ public: // nsIDocumentLoaderObserver NS_IMETHOD OnStartDocumentLoad(nsIDocumentLoader* loader, nsIURI* aURL, const char* aCommand); - NS_IMETHOD OnEndDocumentLoad(nsIDocumentLoader* loader, nsIChannel* channel, nsresult aStatus, nsIDocumentLoaderObserver* aObserver); - NS_IMETHOD OnStartURLLoad(nsIDocumentLoader* loader, nsIChannel* channel, nsIContentViewer* aViewer); + NS_IMETHOD OnEndDocumentLoad(nsIDocumentLoader* loader, nsIChannel* channel, nsresult aStatus); + NS_IMETHOD OnStartURLLoad(nsIDocumentLoader* loader, nsIChannel* channel); NS_IMETHOD OnProgressURLLoad(nsIDocumentLoader* loader, nsIChannel* channel, PRUint32 aProgress, PRUint32 aProgressMax); NS_IMETHOD OnStatusURLLoad(nsIDocumentLoader* loader, nsIChannel* channel, nsString& aMsg); NS_IMETHOD OnEndURLLoad(nsIDocumentLoader* loader, nsIChannel* channel, nsresult aStatus); @@ -696,8 +696,7 @@ nsPICS::OnStartDocumentLoad(nsIDocumentLoader* loader, NS_IMETHODIMP nsPICS::OnEndDocumentLoad(nsIDocumentLoader* loader, nsIChannel* channel, - nsresult aStatus, - nsIDocumentLoaderObserver* aObserver) + nsresult aStatus) { nsresult rv = NS_OK; @@ -719,9 +718,7 @@ nsPICS::OnEndDocumentLoad(nsIDocumentLoader* loader, } NS_IMETHODIMP -nsPICS::OnStartURLLoad(nsIDocumentLoader* loader, - nsIChannel* channel, - nsIContentViewer* aViewer) +nsPICS::OnStartURLLoad(nsIDocumentLoader* loader, nsIChannel* channel) { nsresult rv = NS_OK; diff --git a/mozilla/extensions/wallet/src/nsWalletService.cpp b/mozilla/extensions/wallet/src/nsWalletService.cpp index 19e847232ac..92cf88af936 100644 --- a/mozilla/extensions/wallet/src/nsWalletService.cpp +++ b/mozilla/extensions/wallet/src/nsWalletService.cpp @@ -212,8 +212,7 @@ nsWalletlibService::OnStartDocumentLoad(nsIDocumentLoader* aLoader, nsIURI* aURL #include "prmem.h" NS_IMETHODIMP -nsWalletlibService::OnEndDocumentLoad(nsIDocumentLoader* aLoader, nsIChannel* channel, nsresult aStatus, - nsIDocumentLoaderObserver * aObserver) +nsWalletlibService::OnEndDocumentLoad(nsIDocumentLoader* aLoader, nsIChannel* channel, nsresult aStatus) { nsresult rv = NS_OK; @@ -329,7 +328,7 @@ nsWalletlibService::OnEndDocumentLoad(nsIDocumentLoader* aLoader, nsIChannel* ch NS_IMETHODIMP nsWalletlibService::OnStartURLLoad - (nsIDocumentLoader* loader, nsIChannel* channel, nsIContentViewer* aViewer) + (nsIDocumentLoader* loader, nsIChannel* channel) { return NS_OK; } diff --git a/mozilla/extensions/wallet/src/nsWalletService.h b/mozilla/extensions/wallet/src/nsWalletService.h index 4e5eccb6057..2b8757e4e82 100644 --- a/mozilla/extensions/wallet/src/nsWalletService.h +++ b/mozilla/extensions/wallet/src/nsWalletService.h @@ -75,10 +75,9 @@ public: NS_IMETHOD OnStartDocumentLoad (nsIDocumentLoader* loader, nsIURI* aURL, const char* aCommand); NS_IMETHOD OnEndDocumentLoad - (nsIDocumentLoader* loader, nsIChannel* channel, nsresult aStatus, - nsIDocumentLoaderObserver* aObserver); + (nsIDocumentLoader* loader, nsIChannel* channel, nsresult aStatus); NS_IMETHOD OnStartURLLoad - (nsIDocumentLoader* loader, nsIChannel* channel, nsIContentViewer* aViewer); + (nsIDocumentLoader* loader, nsIChannel* channel); NS_IMETHOD OnProgressURLLoad (nsIDocumentLoader* loader, nsIChannel* channel, PRUint32 aProgress, PRUint32 aProgressMax); diff --git a/mozilla/extensions/xmlterm/base/mozXMLTerminal.cpp b/mozilla/extensions/xmlterm/base/mozXMLTerminal.cpp index 59b6614ac9d..524ee418fc9 100644 --- a/mozilla/extensions/xmlterm/base/mozXMLTerminal.cpp +++ b/mozilla/extensions/xmlterm/base/mozXMLTerminal.cpp @@ -750,8 +750,7 @@ mozXMLTerminal::OnStartDocumentLoad(nsIDocumentLoader* loader, nsIURI* aURL, NS_IMETHODIMP mozXMLTerminal::OnEndDocumentLoad(nsIDocumentLoader* loader, nsIChannel* channel, - nsresult aStatus, - nsIDocumentLoaderObserver * aObserver) + nsresult aStatus) { return NS_OK; @@ -759,8 +758,7 @@ mozXMLTerminal::OnEndDocumentLoad(nsIDocumentLoader* loader, nsIChannel* channel NS_IMETHODIMP mozXMLTerminal::OnStartURLLoad(nsIDocumentLoader* loader, - nsIChannel* channel, - nsIContentViewer* aViewer) + nsIChannel* channel) { return NS_OK; diff --git a/mozilla/extensions/xmlterm/base/mozXMLTerminal.h b/mozilla/extensions/xmlterm/base/mozXMLTerminal.h index fa0aff5e1b0..9d0c03803f4 100644 --- a/mozilla/extensions/xmlterm/base/mozXMLTerminal.h +++ b/mozilla/extensions/xmlterm/base/mozXMLTerminal.h @@ -83,11 +83,9 @@ class mozXMLTerminal : public mozIXMLTerminal, const char* aCommand); NS_IMETHOD OnEndDocumentLoad(nsIDocumentLoader* loader, nsIChannel* channel, - nsresult aStatus, - nsIDocumentLoaderObserver * aObserver); + nsresult aStatus); - NS_IMETHOD OnStartURLLoad(nsIDocumentLoader* loader, nsIChannel* channel, - nsIContentViewer* aViewer); + NS_IMETHOD OnStartURLLoad(nsIDocumentLoader* loader, nsIChannel* channel); NS_IMETHOD OnProgressURLLoad(nsIDocumentLoader* loader, nsIChannel* channel, PRUint32 aProgress, PRUint32 aProgressMax); diff --git a/mozilla/htmlparser/robot/nsDebugRobot.cpp b/mozilla/htmlparser/robot/nsDebugRobot.cpp index 77db7af84b8..33515dc3607 100644 --- a/mozilla/htmlparser/robot/nsDebugRobot.cpp +++ b/mozilla/htmlparser/robot/nsDebugRobot.cpp @@ -141,11 +141,9 @@ public: const char* aCommand); NS_IMETHOD OnEndDocumentLoad(nsIDocumentLoader* loader, nsIChannel* channel, - nsresult aStatus, - nsIDocumentLoaderObserver * aObserver); + nsresult aStatus); NS_IMETHOD OnStartURLLoad(nsIDocumentLoader* loader, - nsIChannel* channel, - nsIContentViewer* aViewer); + nsIChannel* channel); NS_IMETHOD OnProgressURLLoad(nsIDocumentLoader* loader, nsIChannel* channel, PRUint32 aProgress, @@ -175,8 +173,7 @@ CStreamListener::OnStartDocumentLoad(nsIDocumentLoader* loader, NS_IMETHODIMP CStreamListener::OnEndDocumentLoad(nsIDocumentLoader* loader, nsIChannel* channel, - nsresult aStatus, - nsIDocumentLoaderObserver * aObserver) + nsresult aStatus) { fputs("done.\n",stdout); g_bReadyForNextUrl = PR_TRUE; @@ -185,8 +182,7 @@ CStreamListener::OnEndDocumentLoad(nsIDocumentLoader* loader, NS_IMETHODIMP CStreamListener::OnStartURLLoad(nsIDocumentLoader* loader, - nsIChannel* channel, - nsIContentViewer* aViewer) + nsIChannel* channel) { return NS_OK; } diff --git a/mozilla/layout/html/forms/src/nsGfxTextControlFrame.cpp b/mozilla/layout/html/forms/src/nsGfxTextControlFrame.cpp index 398518452fe..6c48263b185 100644 --- a/mozilla/layout/html/forms/src/nsGfxTextControlFrame.cpp +++ b/mozilla/layout/html/forms/src/nsGfxTextControlFrame.cpp @@ -3977,8 +3977,7 @@ EnderTempObserver::OnStartDocumentLoad(nsIDocumentLoader* loader, NS_IMETHODIMP EnderTempObserver::OnEndDocumentLoad(nsIDocumentLoader* loader, nsIChannel* channel, - nsresult aStatus, - nsIDocumentLoaderObserver * aObserver) + nsresult aStatus) { if (PR_TRUE==mFirstCall) { @@ -3992,8 +3991,7 @@ EnderTempObserver::OnEndDocumentLoad(nsIDocumentLoader* loader, NS_IMETHODIMP EnderTempObserver::OnStartURLLoad(nsIDocumentLoader* loader, - nsIChannel* channel, - nsIContentViewer* aViewer) + nsIChannel* channel) { return NS_OK; } diff --git a/mozilla/layout/html/forms/src/nsGfxTextControlFrame.h b/mozilla/layout/html/forms/src/nsGfxTextControlFrame.h index 2a52f2104ad..7cbd032b5e2 100644 --- a/mozilla/layout/html/forms/src/nsGfxTextControlFrame.h +++ b/mozilla/layout/html/forms/src/nsGfxTextControlFrame.h @@ -82,11 +82,9 @@ public: const char* aCommand); NS_IMETHOD OnEndDocumentLoad(nsIDocumentLoader* loader, nsIChannel* channel, - nsresult aStatus, - nsIDocumentLoaderObserver * aObserver); + nsresult aStatus); NS_IMETHOD OnStartURLLoad(nsIDocumentLoader* loader, - nsIChannel* channel, - nsIContentViewer* aViewer); + nsIChannel* channel); NS_IMETHOD OnProgressURLLoad(nsIDocumentLoader* loader, nsIChannel* channel, PRUint32 aProgress, diff --git a/mozilla/lib/mac/embedding/powerplant/source/CWebShell.h b/mozilla/lib/mac/embedding/powerplant/source/CWebShell.h index 234fce1897e..d5817145ae4 100644 --- a/mozilla/lib/mac/embedding/powerplant/source/CWebShell.h +++ b/mozilla/lib/mac/embedding/powerplant/source/CWebShell.h @@ -81,12 +81,10 @@ public: NS_IMETHOD OnStartDocumentLoad(nsIDocumentLoader* /*loader*/, nsIURI* /*aURL*/, const char* /*aCommand*/) { return NS_ERROR_NOT_IMPLEMENTED; /* XXX TBI */}; - NS_IMETHOD OnEndDocumentLoad(nsIDocumentLoader* /*loader*/, nsIChannel* /*channel*/, nsresult /*aStatus*/, - nsIDocumentLoaderObserver * /*aObserver*/) + NS_IMETHOD OnEndDocumentLoad(nsIDocumentLoader* /*loader*/, nsIChannel* /*channel*/, nsresult /*aStatus*/) { return NS_ERROR_NOT_IMPLEMENTED; /* XXX TBI */}; - NS_IMETHOD OnStartURLLoad(nsIDocumentLoader* /*loader*/, nsIChannel* /*channel*/, - nsIContentViewer* /*aViewer*/) + NS_IMETHOD OnStartURLLoad(nsIDocumentLoader* /*loader*/, nsIChannel* /*channel*/) { return NS_ERROR_NOT_IMPLEMENTED; /* XXX TBI */}; NS_IMETHOD OnProgressURLLoad(nsIDocumentLoader* loader, diff --git a/mozilla/mailnews/base/src/nsMsgStatusFeedback.cpp b/mozilla/mailnews/base/src/nsMsgStatusFeedback.cpp index bb4858585ff..6f1919a6565 100644 --- a/mozilla/mailnews/base/src/nsMsgStatusFeedback.cpp +++ b/mozilla/mailnews/base/src/nsMsgStatusFeedback.cpp @@ -96,8 +96,7 @@ nsMsgStatusFeedback::OnStartDocumentLoad(nsIDocumentLoader* aLoader, nsIURI* aUR NS_IMETHODIMP -nsMsgStatusFeedback::OnEndDocumentLoad(nsIDocumentLoader* aLoader, nsIChannel* channel, nsresult aStatus, - nsIDocumentLoaderObserver * aObserver) +nsMsgStatusFeedback::OnEndDocumentLoad(nsIDocumentLoader* aLoader, nsIChannel* channel, nsresult aStatus) { NS_PRECONDITION(aLoader != nsnull, "null ptr"); if (! aLoader) @@ -132,7 +131,7 @@ nsMsgStatusFeedback::OnEndDocumentLoad(nsIDocumentLoader* aLoader, nsIChannel* c return rv; } -NS_IMETHODIMP nsMsgStatusFeedback::OnStartURLLoad(nsIDocumentLoader* loader, nsIChannel* channel, nsIContentViewer* aViewer) +NS_IMETHODIMP nsMsgStatusFeedback::OnStartURLLoad(nsIDocumentLoader* loader, nsIChannel* channel) { return NS_OK; } diff --git a/mozilla/mailnews/base/src/nsMsgStatusFeedback.h b/mozilla/mailnews/base/src/nsMsgStatusFeedback.h index c2885700778..fbb482587bb 100644 --- a/mozilla/mailnews/base/src/nsMsgStatusFeedback.h +++ b/mozilla/mailnews/base/src/nsMsgStatusFeedback.h @@ -40,8 +40,8 @@ public: // nsIDocumntLoaderObserver NS_IMETHOD OnStartDocumentLoad(nsIDocumentLoader* loader, nsIURI* aURL, const char* aCommand); - NS_IMETHOD OnEndDocumentLoad(nsIDocumentLoader* loader, nsIChannel* channel, nsresult aStatus, nsIDocumentLoaderObserver* aObserver); - NS_IMETHOD OnStartURLLoad(nsIDocumentLoader* loader, nsIChannel* channel, nsIContentViewer* aViewer); + NS_IMETHOD OnEndDocumentLoad(nsIDocumentLoader* loader, nsIChannel* channel, nsresult aStatus); + NS_IMETHOD OnStartURLLoad(nsIDocumentLoader* loader, nsIChannel* channel); NS_IMETHOD OnProgressURLLoad(nsIDocumentLoader* loader, nsIChannel* channel, PRUint32 aProgress, PRUint32 aProgressMax); NS_IMETHOD OnStatusURLLoad(nsIDocumentLoader* loader, nsIChannel* channel, nsString& aMsg); NS_IMETHOD OnEndURLLoad(nsIDocumentLoader* loader, nsIChannel* channel, nsresult aStatus); diff --git a/mozilla/parser/htmlparser/robot/nsDebugRobot.cpp b/mozilla/parser/htmlparser/robot/nsDebugRobot.cpp index 77db7af84b8..33515dc3607 100644 --- a/mozilla/parser/htmlparser/robot/nsDebugRobot.cpp +++ b/mozilla/parser/htmlparser/robot/nsDebugRobot.cpp @@ -141,11 +141,9 @@ public: const char* aCommand); NS_IMETHOD OnEndDocumentLoad(nsIDocumentLoader* loader, nsIChannel* channel, - nsresult aStatus, - nsIDocumentLoaderObserver * aObserver); + nsresult aStatus); NS_IMETHOD OnStartURLLoad(nsIDocumentLoader* loader, - nsIChannel* channel, - nsIContentViewer* aViewer); + nsIChannel* channel); NS_IMETHOD OnProgressURLLoad(nsIDocumentLoader* loader, nsIChannel* channel, PRUint32 aProgress, @@ -175,8 +173,7 @@ CStreamListener::OnStartDocumentLoad(nsIDocumentLoader* loader, NS_IMETHODIMP CStreamListener::OnEndDocumentLoad(nsIDocumentLoader* loader, nsIChannel* channel, - nsresult aStatus, - nsIDocumentLoaderObserver * aObserver) + nsresult aStatus) { fputs("done.\n",stdout); g_bReadyForNextUrl = PR_TRUE; @@ -185,8 +182,7 @@ CStreamListener::OnEndDocumentLoad(nsIDocumentLoader* loader, NS_IMETHODIMP CStreamListener::OnStartURLLoad(nsIDocumentLoader* loader, - nsIChannel* channel, - nsIContentViewer* aViewer) + nsIChannel* channel) { return NS_OK; } diff --git a/mozilla/uriloader/base/nsDocLoader.cpp b/mozilla/uriloader/base/nsDocLoader.cpp index d4244248a58..09581e323b9 100644 --- a/mozilla/uriloader/base/nsDocLoader.cpp +++ b/mozilla/uriloader/base/nsDocLoader.cpp @@ -19,18 +19,14 @@ * * Contributor(s): */ +#include "nspr.h" +#include "prlog.h" + #include "nsIDocumentLoader.h" -#include "nsIWebShell.h" -#include "prmem.h" -#include "plstr.h" #include "nsString.h" #include "nsISupportsArray.h" #include "nsIURL.h" -#include "nsIStreamListener.h" #include "nsIFactory.h" -#include "nsIContentViewerContainer.h" -#include "nsIContentViewer.h" -#include "nsITimer.h" #include "nsIDocumentLoaderObserver.h" #include "nsVoidArray.h" #include "nsIServiceManager.h" @@ -39,33 +35,19 @@ #include "nsILoadGroup.h" #include "nsNetUtil.h" -#include "nsIURL.h" #include "nsIChannel.h" -#include "nsIHTTPChannel.h" -#include "nsHTTPEnums.h" -#include "nsIDNSService.h" -#include "nsIProgressEventSink.h" #include "nsIGenericFactory.h" #include "nsCOMPtr.h" #include "nsCom.h" -#include "prlog.h" -#include "prprf.h" #include "nsWeakReference.h" -#include "nsIStreamConverterService.h" -#include "nsIStreamConverter.h" -static NS_DEFINE_CID(kStreamConverterServiceCID, NS_STREAMCONVERTERSERVICE_CID); - -#include - -#include "nsIPref.h" -#include "nsIURIContentListener.h" #include "nsIURILoader.h" #include "nsCURILoader.h" // XXX ick ick ick +#include "nsIContentViewerContainer.h" #include "nsIDocument.h" #include "nsIPresShell.h" #include "nsIPresContext.h" @@ -92,7 +74,6 @@ static NS_DEFINE_IID(kIDocumentLoaderIID, NS_IDOCUMENTLOADER_IID); static NS_DEFINE_IID(kIDocumentLoaderFactoryIID, NS_IDOCUMENTLOADERFACTORY_IID); static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID); static NS_DEFINE_IID(kIDocumentIID, NS_IDOCUMENT_IID); -static NS_DEFINE_IID(kIStreamListenerIID, NS_ISTREAMLISTENER_IID); static NS_DEFINE_IID(kIContentViewerContainerIID, NS_ICONTENT_VIEWER_CONTAINER_IID); static NS_DEFINE_CID(kGenericFactoryCID, NS_GENERICFACTORY_CID); @@ -143,7 +124,7 @@ public: NS_IMETHOD GetContentViewerContainer(PRUint32 aDocumentID, nsIContentViewerContainer** aResult); - NS_IMETHOD GetLoadGroup(nsILoadGroup** aResult); + NS_IMETHOD GetLoadGroup(nsILoadGroup** aResult); NS_IMETHOD Destroy(); @@ -165,8 +146,7 @@ protected: nsresult aStatus); void FireOnStartURLLoad(nsDocLoaderImpl* aLoadInitiator, - nsIChannel* channel, - nsIContentViewer* aViewer); + nsIChannel* channel); void FireOnEndURLLoad(nsDocLoaderImpl* aLoadInitiator, nsIChannel* channel, nsresult aStatus); @@ -636,13 +616,7 @@ nsDocLoaderImpl::OnStartRequest(nsIChannel *aChannel, nsISupports *aCtxt) FireOnStartDocumentLoad(this, uri); } else { - nsCOMPtr viewer; - nsCOMPtr webShell(do_QueryInterface(mContainer)); - NS_ENSURE_TRUE(webShell, NS_ERROR_FAILURE); - - webShell->GetContentViewer(getter_AddRefs(viewer)); - - FireOnStartURLLoad(this, aChannel, viewer); + FireOnStartURLLoad(this, aChannel); } } return NS_OK; @@ -835,7 +809,7 @@ void nsDocLoaderImpl::FireOnEndDocumentLoad(nsDocLoaderImpl* aLoadInitiator, continue; } - observer->OnEndDocumentLoad(aLoadInitiator, aDocChannel, aStatus, observer); + observer->OnEndDocumentLoad(aLoadInitiator, aDocChannel, aStatus); } /* @@ -848,8 +822,7 @@ void nsDocLoaderImpl::FireOnEndDocumentLoad(nsDocLoaderImpl* aLoadInitiator, void nsDocLoaderImpl::FireOnStartURLLoad(nsDocLoaderImpl* aLoadInitiator, - nsIChannel* aChannel, - nsIContentViewer* aViewer) + nsIChannel* aChannel) { #if defined(DEBUG) nsCOMPtr uri; @@ -864,8 +837,8 @@ void nsDocLoaderImpl::FireOnStartURLLoad(nsDocLoaderImpl* aLoadInitiator, if (aLoadInitiator == this) { PR_LOG(gDocLoaderLog, PR_LOG_DEBUG, ("DocLoader:%p: ++ Firing OnStartURLLoad(...)" - "\tURI: %s Viewer: %x\n", - this, buffer, aViewer)); + "\tURI: %s\n", + this, buffer)); } else { PR_LOG(gDocLoaderLog, PR_LOG_DEBUG, ("DocLoader:%p: -- Propagating OnStartURLLoad(...)." @@ -896,14 +869,14 @@ void nsDocLoaderImpl::FireOnStartURLLoad(nsDocLoaderImpl* aLoadInitiator, continue; } - observer->OnStartURLLoad(aLoadInitiator, aChannel, aViewer); + observer->OnStartURLLoad(aLoadInitiator, aChannel); } /* * Finally notify the parent... */ if (mParent) { - mParent->FireOnStartURLLoad(aLoadInitiator, aChannel, aViewer); + mParent->FireOnStartURLLoad(aLoadInitiator, aChannel); } } diff --git a/mozilla/webshell/embed/ActiveX/WebShellContainer.cpp b/mozilla/webshell/embed/ActiveX/WebShellContainer.cpp index fac24915c68..cf2c2c88cd4 100644 --- a/mozilla/webshell/embed/ActiveX/WebShellContainer.cpp +++ b/mozilla/webshell/embed/ActiveX/WebShellContainer.cpp @@ -517,7 +517,7 @@ CWebShellContainer::OnStartDocumentLoad(nsIDocumentLoader* loader, nsIURI* aURL, // we need this to fire the document complete NS_IMETHODIMP -CWebShellContainer::OnEndDocumentLoad(nsIDocumentLoader* loader, nsIChannel *aChannel, nsresult aStatus, nsIDocumentLoaderObserver * aObserver) +CWebShellContainer::OnEndDocumentLoad(nsIDocumentLoader* loader, nsIChannel *aChannel, nsresult aStatus) { NG_TRACE(_T("CWebShellContainer::OnEndDocumentLoad(..., \"\")\n")); @@ -556,7 +556,7 @@ CWebShellContainer::OnEndDocumentLoad(nsIDocumentLoader* loader, nsIChannel *aCh } NS_IMETHODIMP -CWebShellContainer::OnStartURLLoad(nsIDocumentLoader* loader, nsIChannel* aChannel, nsIContentViewer* aViewer) +CWebShellContainer::OnStartURLLoad(nsIDocumentLoader* loader, nsIChannel* aChannel) { NG_TRACE(_T("CWebShellContainer::OnStartURLLoad(..., \"\")\n")); diff --git a/mozilla/webshell/embed/ActiveX/WebShellContainer.h b/mozilla/webshell/embed/ActiveX/WebShellContainer.h index 6d52dc77d81..fa5b0a5030e 100644 --- a/mozilla/webshell/embed/ActiveX/WebShellContainer.h +++ b/mozilla/webshell/embed/ActiveX/WebShellContainer.h @@ -100,8 +100,8 @@ public: // nsIDocumentLoaderObserver NS_IMETHOD OnStartDocumentLoad(nsIDocumentLoader* loader, nsIURI* aURL, const char* aCommand); - NS_IMETHOD OnEndDocumentLoad(nsIDocumentLoader* loader, nsIChannel* channel, nsresult aStatus, nsIDocumentLoaderObserver* aObserver); - NS_IMETHOD OnStartURLLoad(nsIDocumentLoader* loader, nsIChannel* channel, nsIContentViewer* aViewer); + NS_IMETHOD OnEndDocumentLoad(nsIDocumentLoader* loader, nsIChannel* channel, nsresult aStatus); + NS_IMETHOD OnStartURLLoad(nsIDocumentLoader* loader, nsIChannel* channel); NS_IMETHOD OnProgressURLLoad(nsIDocumentLoader* loader, nsIChannel* channel, PRUint32 aProgress, PRUint32 aProgressMax); NS_IMETHOD OnStatusURLLoad(nsIDocumentLoader* loader, nsIChannel* channel, nsString& aMsg); NS_IMETHOD OnEndURLLoad(nsIDocumentLoader* loader, nsIChannel* channel, nsresult aStatus); diff --git a/mozilla/webshell/public/nsIDocumentLoaderObserver.h b/mozilla/webshell/public/nsIDocumentLoaderObserver.h index 620506db1ec..abdddbf44da 100644 --- a/mozilla/webshell/public/nsIDocumentLoaderObserver.h +++ b/mozilla/webshell/public/nsIDocumentLoaderObserver.h @@ -55,8 +55,7 @@ public: /** * Notify the observer that a document has been completely loaded. */ - NS_IMETHOD OnEndDocumentLoad(nsIDocumentLoader* loader, nsIChannel* channel, nsresult aStatus, - nsIDocumentLoaderObserver * aObserver) = 0; + NS_IMETHOD OnEndDocumentLoad(nsIDocumentLoader* loader, nsIChannel* channel, nsresult aStatus) = 0; /** * Notify the observer that the specified nsIURI has just started to load. @@ -64,8 +63,7 @@ public: * This notification occurs after DNS resolution, and a connection to the * server has been established. */ - NS_IMETHOD OnStartURLLoad(nsIDocumentLoader* loader, nsIChannel* channel, - nsIContentViewer* aViewer) = 0; + NS_IMETHOD OnStartURLLoad(nsIDocumentLoader* loader, nsIChannel* channel) = 0; /** * Notify the observer that progress has occurred in the loading of the diff --git a/mozilla/webshell/src/nsDocLoader.cpp b/mozilla/webshell/src/nsDocLoader.cpp index d4244248a58..09581e323b9 100644 --- a/mozilla/webshell/src/nsDocLoader.cpp +++ b/mozilla/webshell/src/nsDocLoader.cpp @@ -19,18 +19,14 @@ * * Contributor(s): */ +#include "nspr.h" +#include "prlog.h" + #include "nsIDocumentLoader.h" -#include "nsIWebShell.h" -#include "prmem.h" -#include "plstr.h" #include "nsString.h" #include "nsISupportsArray.h" #include "nsIURL.h" -#include "nsIStreamListener.h" #include "nsIFactory.h" -#include "nsIContentViewerContainer.h" -#include "nsIContentViewer.h" -#include "nsITimer.h" #include "nsIDocumentLoaderObserver.h" #include "nsVoidArray.h" #include "nsIServiceManager.h" @@ -39,33 +35,19 @@ #include "nsILoadGroup.h" #include "nsNetUtil.h" -#include "nsIURL.h" #include "nsIChannel.h" -#include "nsIHTTPChannel.h" -#include "nsHTTPEnums.h" -#include "nsIDNSService.h" -#include "nsIProgressEventSink.h" #include "nsIGenericFactory.h" #include "nsCOMPtr.h" #include "nsCom.h" -#include "prlog.h" -#include "prprf.h" #include "nsWeakReference.h" -#include "nsIStreamConverterService.h" -#include "nsIStreamConverter.h" -static NS_DEFINE_CID(kStreamConverterServiceCID, NS_STREAMCONVERTERSERVICE_CID); - -#include - -#include "nsIPref.h" -#include "nsIURIContentListener.h" #include "nsIURILoader.h" #include "nsCURILoader.h" // XXX ick ick ick +#include "nsIContentViewerContainer.h" #include "nsIDocument.h" #include "nsIPresShell.h" #include "nsIPresContext.h" @@ -92,7 +74,6 @@ static NS_DEFINE_IID(kIDocumentLoaderIID, NS_IDOCUMENTLOADER_IID); static NS_DEFINE_IID(kIDocumentLoaderFactoryIID, NS_IDOCUMENTLOADERFACTORY_IID); static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID); static NS_DEFINE_IID(kIDocumentIID, NS_IDOCUMENT_IID); -static NS_DEFINE_IID(kIStreamListenerIID, NS_ISTREAMLISTENER_IID); static NS_DEFINE_IID(kIContentViewerContainerIID, NS_ICONTENT_VIEWER_CONTAINER_IID); static NS_DEFINE_CID(kGenericFactoryCID, NS_GENERICFACTORY_CID); @@ -143,7 +124,7 @@ public: NS_IMETHOD GetContentViewerContainer(PRUint32 aDocumentID, nsIContentViewerContainer** aResult); - NS_IMETHOD GetLoadGroup(nsILoadGroup** aResult); + NS_IMETHOD GetLoadGroup(nsILoadGroup** aResult); NS_IMETHOD Destroy(); @@ -165,8 +146,7 @@ protected: nsresult aStatus); void FireOnStartURLLoad(nsDocLoaderImpl* aLoadInitiator, - nsIChannel* channel, - nsIContentViewer* aViewer); + nsIChannel* channel); void FireOnEndURLLoad(nsDocLoaderImpl* aLoadInitiator, nsIChannel* channel, nsresult aStatus); @@ -636,13 +616,7 @@ nsDocLoaderImpl::OnStartRequest(nsIChannel *aChannel, nsISupports *aCtxt) FireOnStartDocumentLoad(this, uri); } else { - nsCOMPtr viewer; - nsCOMPtr webShell(do_QueryInterface(mContainer)); - NS_ENSURE_TRUE(webShell, NS_ERROR_FAILURE); - - webShell->GetContentViewer(getter_AddRefs(viewer)); - - FireOnStartURLLoad(this, aChannel, viewer); + FireOnStartURLLoad(this, aChannel); } } return NS_OK; @@ -835,7 +809,7 @@ void nsDocLoaderImpl::FireOnEndDocumentLoad(nsDocLoaderImpl* aLoadInitiator, continue; } - observer->OnEndDocumentLoad(aLoadInitiator, aDocChannel, aStatus, observer); + observer->OnEndDocumentLoad(aLoadInitiator, aDocChannel, aStatus); } /* @@ -848,8 +822,7 @@ void nsDocLoaderImpl::FireOnEndDocumentLoad(nsDocLoaderImpl* aLoadInitiator, void nsDocLoaderImpl::FireOnStartURLLoad(nsDocLoaderImpl* aLoadInitiator, - nsIChannel* aChannel, - nsIContentViewer* aViewer) + nsIChannel* aChannel) { #if defined(DEBUG) nsCOMPtr uri; @@ -864,8 +837,8 @@ void nsDocLoaderImpl::FireOnStartURLLoad(nsDocLoaderImpl* aLoadInitiator, if (aLoadInitiator == this) { PR_LOG(gDocLoaderLog, PR_LOG_DEBUG, ("DocLoader:%p: ++ Firing OnStartURLLoad(...)" - "\tURI: %s Viewer: %x\n", - this, buffer, aViewer)); + "\tURI: %s\n", + this, buffer)); } else { PR_LOG(gDocLoaderLog, PR_LOG_DEBUG, ("DocLoader:%p: -- Propagating OnStartURLLoad(...)." @@ -896,14 +869,14 @@ void nsDocLoaderImpl::FireOnStartURLLoad(nsDocLoaderImpl* aLoadInitiator, continue; } - observer->OnStartURLLoad(aLoadInitiator, aChannel, aViewer); + observer->OnStartURLLoad(aLoadInitiator, aChannel); } /* * Finally notify the parent... */ if (mParent) { - mParent->FireOnStartURLLoad(aLoadInitiator, aChannel, aViewer); + mParent->FireOnStartURLLoad(aLoadInitiator, aChannel); } } diff --git a/mozilla/webshell/src/nsWebShell.cpp b/mozilla/webshell/src/nsWebShell.cpp index 611eb3c65e7..55b33eb3352 100644 --- a/mozilla/webshell/src/nsWebShell.cpp +++ b/mozilla/webshell/src/nsWebShell.cpp @@ -311,11 +311,9 @@ public: const char* aCommand); NS_IMETHOD OnEndDocumentLoad(nsIDocumentLoader* loader, nsIChannel* channel, - nsresult aStatus, - nsIDocumentLoaderObserver * ); + nsresult aStatus); NS_IMETHOD OnStartURLLoad(nsIDocumentLoader* loader, - nsIChannel* channel, - nsIContentViewer* aViewer); + nsIChannel* channel); NS_IMETHOD OnProgressURLLoad(nsIDocumentLoader* loader, nsIChannel* channel, PRUint32 aProgress, PRUint32 aProgressMax); @@ -1574,7 +1572,7 @@ nsWebShell::DoLoadURL(nsIURI * aUri, mReferrer = aReferrer; } // Pass on status of scrolling/anchor visit to docloaderobserver - rv = OnEndDocumentLoad(mDocLoader, dummyChannel, rv, this); + rv = OnEndDocumentLoad(mDocLoader, dummyChannel, rv); return rv; } else if (aType == nsISessionHistory::LOAD_HISTORY) @@ -1594,14 +1592,14 @@ nsWebShell::DoLoadURL(nsIURI * aUri, } mProcessedEndDocumentLoad = PR_FALSE; // Pass on status of scrolling/anchor visit to docloaderobserver - rv = OnEndDocumentLoad(mDocLoader, dummyChannel, rv, this); + rv = OnEndDocumentLoad(mDocLoader, dummyChannel, rv); return rv; } } #if 0 mProcessedEndDocumentLoad = PR_FALSE; // Pass on status of scrolling/anchor visit to docloaderobserver - rv = OnEndDocumentLoad(mDocLoader, dummyChannel, rv, this); + rv = OnEndDocumentLoad(mDocLoader, dummyChannel, rv); return rv; #endif /* 0 */ } // NS_SUCCEEDED(rv) && presShell @@ -2950,8 +2948,7 @@ nsWebShell::OnStartDocumentLoad(nsIDocumentLoader* loader, NS_IMETHODIMP nsWebShell::OnEndDocumentLoad(nsIDocumentLoader* loader, nsIChannel* channel, - nsresult aStatus, - nsIDocumentLoaderObserver * aWebShell) + nsresult aStatus) { #ifdef MOZ_PERF_METRICS MOZ_TIMER_DEBUGLOG(("Stop: nsWebShell::OnEndDocumentLoad(), this=%p\n", this)); @@ -3041,7 +3038,7 @@ nsWebShell::OnEndDocumentLoad(nsIDocumentLoader* loader, * Fire the OnEndDocumentLoad of the DocLoaderobserver */ if (dlObserver && (nsnull != aURL)) { - dlObserver->OnEndDocumentLoad(mDocLoader, channel, aStatus, aWebShell); + dlObserver->OnEndDocumentLoad(mDocLoader, channel, aStatus); } if ( (mDocLoader == loader) && (aStatus == NS_ERROR_UNKNOWN_HOST) ) { @@ -3107,8 +3104,7 @@ nsWebShell::OnEndDocumentLoad(nsIDocumentLoader* loader, NS_IMETHODIMP nsWebShell::OnStartURLLoad(nsIDocumentLoader* loader, - nsIChannel* channel, - nsIContentViewer* aViewer) + nsIChannel* channel) { nsresult rv; @@ -3129,7 +3125,7 @@ nsWebShell::OnStartURLLoad(nsIDocumentLoader* loader, */ if ((nsnull != mContainer) && (nsnull != mDocLoaderObserver)) { - mDocLoaderObserver->OnStartURLLoad(mDocLoader, channel, aViewer); + mDocLoaderObserver->OnStartURLLoad(mDocLoader, channel); } return NS_OK; } @@ -4016,7 +4012,7 @@ NS_IMETHODIMP nsWebShell::SetDocument(nsIDOMDocument *aDOMDoc, // (7) fire end document load notification mProcessedEndDocumentLoad = PR_FALSE; nsresult rv = NS_OK; - NS_ENSURE_SUCCESS(OnEndDocumentLoad(mDocLoader, dummyChannel, rv, this), NS_ERROR_FAILURE); + NS_ENSURE_SUCCESS(OnEndDocumentLoad(mDocLoader, dummyChannel, rv), NS_ERROR_FAILURE); NS_ENSURE_SUCCESS(rv, NS_ERROR_FAILURE); // test the resulting out-param separately return NS_OK; diff --git a/mozilla/webshell/tests/viewer/nsBrowserWindow.cpp b/mozilla/webshell/tests/viewer/nsBrowserWindow.cpp index b5dc4515606..a013a62f987 100644 --- a/mozilla/webshell/tests/viewer/nsBrowserWindow.cpp +++ b/mozilla/webshell/tests/viewer/nsBrowserWindow.cpp @@ -2032,16 +2032,14 @@ nsBrowserWindow::OnStartDocumentLoad(nsIDocumentLoader* loader, NS_IMETHODIMP nsBrowserWindow::OnEndDocumentLoad(nsIDocumentLoader* loader, nsIChannel* channel, - nsresult aStatus, - nsIDocumentLoaderObserver * aObserver) + nsresult aStatus) { return NS_OK; } NS_IMETHODIMP nsBrowserWindow::OnStartURLLoad(nsIDocumentLoader* loader, - nsIChannel* channel, - nsIContentViewer* aViewer) + nsIChannel* channel) { nsresult rv; diff --git a/mozilla/webshell/tests/viewer/nsBrowserWindow.h b/mozilla/webshell/tests/viewer/nsBrowserWindow.h index f94faf172df..e90bab599e8 100644 --- a/mozilla/webshell/tests/viewer/nsBrowserWindow.h +++ b/mozilla/webshell/tests/viewer/nsBrowserWindow.h @@ -113,11 +113,9 @@ public: const char* aCommand); NS_IMETHOD OnEndDocumentLoad(nsIDocumentLoader* loader, nsIChannel* channel, - nsresult aStatus, - nsIDocumentLoaderObserver * aObserver); + nsresult aStatus); NS_IMETHOD OnStartURLLoad(nsIDocumentLoader* loader, - nsIChannel* channel, - nsIContentViewer* aViewer); + nsIChannel* channel); NS_IMETHOD OnProgressURLLoad(nsIDocumentLoader* loader, nsIChannel* channel, PRUint32 aProgress, diff --git a/mozilla/webshell/tests/viewer/nsWebCrawler.cpp b/mozilla/webshell/tests/viewer/nsWebCrawler.cpp index defac72965f..f98c90042bd 100644 --- a/mozilla/webshell/tests/viewer/nsWebCrawler.cpp +++ b/mozilla/webshell/tests/viewer/nsWebCrawler.cpp @@ -215,8 +215,7 @@ nsWebCrawler::OnStartDocumentLoad(nsIDocumentLoader* loader, nsIURI* aURL, NS_IMETHODIMP nsWebCrawler::OnEndDocumentLoad(nsIDocumentLoader* loader, nsIChannel* channel, - nsresult aStatus, - nsIDocumentLoaderObserver* aObserver) + nsresult aStatus) { nsresult rv; PRTime endLoadTime = PR_Now(); @@ -370,8 +369,7 @@ nsWebCrawler::OnEndDocumentLoad(nsIDocumentLoader* loader, NS_IMETHODIMP nsWebCrawler::OnStartURLLoad(nsIDocumentLoader* loader, - nsIChannel* channel, - nsIContentViewer* aViewer) + nsIChannel* channel) { return NS_OK; } diff --git a/mozilla/webshell/tests/viewer/nsWebCrawler.h b/mozilla/webshell/tests/viewer/nsWebCrawler.h index 7a779b77a61..55839152974 100644 --- a/mozilla/webshell/tests/viewer/nsWebCrawler.h +++ b/mozilla/webshell/tests/viewer/nsWebCrawler.h @@ -51,10 +51,8 @@ public: NS_IMETHOD OnStartDocumentLoad(nsIDocumentLoader* loader, nsIURI* aURL, const char* aCommand); NS_IMETHOD OnEndDocumentLoad(nsIDocumentLoader* loader, nsIChannel* channel, - nsresult aStatus, - nsIDocumentLoaderObserver* aObserver); - NS_IMETHOD OnStartURLLoad(nsIDocumentLoader* loader, nsIChannel* channel, - nsIContentViewer* aViewer); + nsresult aStatus); + NS_IMETHOD OnStartURLLoad(nsIDocumentLoader* loader, nsIChannel* channel); NS_IMETHOD OnProgressURLLoad(nsIDocumentLoader* loader, nsIChannel* channel, PRUint32 aProgress, PRUint32 aProgressMax); NS_IMETHOD OnStatusURLLoad(nsIDocumentLoader* loader, nsIChannel* channel, diff --git a/mozilla/xpfe/appshell/src/nsWebShellWindow.cpp b/mozilla/xpfe/appshell/src/nsWebShellWindow.cpp index 5ebb207d63d..86120cd4cee 100644 --- a/mozilla/xpfe/appshell/src/nsWebShellWindow.cpp +++ b/mozilla/xpfe/appshell/src/nsWebShellWindow.cpp @@ -1909,8 +1909,7 @@ nsWebShellWindow::OnStartDocumentLoad(nsIDocumentLoader* loader, NS_IMETHODIMP nsWebShellWindow::OnEndDocumentLoad(nsIDocumentLoader* loader, - nsIChannel* channel, nsresult aStatus, - nsIDocumentLoaderObserver * aDocObserver) + nsIChannel* channel, nsresult aStatus) { #ifdef DEBUG_MENUSDEL printf("OnEndDocumentLoad\n"); @@ -1991,8 +1990,7 @@ nsWebShellWindow::OnEndDocumentLoad(nsIDocumentLoader* loader, NS_IMETHODIMP nsWebShellWindow::OnStartURLLoad(nsIDocumentLoader* loader, - nsIChannel* channel, - nsIContentViewer* aViewer) + nsIChannel* channel) { return NS_OK; } diff --git a/mozilla/xpfe/appshell/src/nsWebShellWindow.h b/mozilla/xpfe/appshell/src/nsWebShellWindow.h index 8ed248d43c3..449a055bb57 100644 --- a/mozilla/xpfe/appshell/src/nsWebShellWindow.h +++ b/mozilla/xpfe/appshell/src/nsWebShellWindow.h @@ -153,8 +153,8 @@ public: // nsIDocumentLoaderObserver NS_IMETHOD OnStartDocumentLoad(nsIDocumentLoader* loader, nsIURI* aURL, const char* aCommand); - NS_IMETHOD OnEndDocumentLoad(nsIDocumentLoader* loader, nsIChannel* channel, nsresult aStatus, nsIDocumentLoaderObserver* aObserver); - NS_IMETHOD OnStartURLLoad(nsIDocumentLoader* loader, nsIChannel* channel, nsIContentViewer* aViewer); + NS_IMETHOD OnEndDocumentLoad(nsIDocumentLoader* loader, nsIChannel* channel, nsresult aStatus); + NS_IMETHOD OnStartURLLoad(nsIDocumentLoader* loader, nsIChannel* channel); NS_IMETHOD OnProgressURLLoad(nsIDocumentLoader* loader, nsIChannel* channel, PRUint32 aProgress, PRUint32 aProgressMax); NS_IMETHOD OnStatusURLLoad(nsIDocumentLoader* loader, nsIChannel* channel, nsString& aMsg); NS_IMETHOD OnEndURLLoad(nsIDocumentLoader* loader, nsIChannel* channel, nsresult aStatus); diff --git a/mozilla/xpfe/browser/src/nsBrowserInstance.cpp b/mozilla/xpfe/browser/src/nsBrowserInstance.cpp index f16bd295ba5..2dd48f9250f 100644 --- a/mozilla/xpfe/browser/src/nsBrowserInstance.cpp +++ b/mozilla/xpfe/browser/src/nsBrowserInstance.cpp @@ -1444,8 +1444,7 @@ nsBrowserAppCore::OnStartDocumentLoad(nsIDocumentLoader* aLoader, nsIURI* aURL, NS_IMETHODIMP -nsBrowserAppCore::OnEndDocumentLoad(nsIDocumentLoader* aLoader, nsIChannel* channel, nsresult aStatus, - nsIDocumentLoaderObserver * aObserver) +nsBrowserAppCore::OnEndDocumentLoad(nsIDocumentLoader* aLoader, nsIChannel* channel, nsresult aStatus) { NS_PRECONDITION(aLoader != nsnull, "null ptr"); if (! aLoader) @@ -1466,9 +1465,12 @@ nsBrowserAppCore::OnEndDocumentLoad(nsIDocumentLoader* aLoader, nsIChannel* chan if (NS_FAILED(rv)) return rv; PRBool isFrame=PR_FALSE; + nsCOMPtr container; nsCOMPtr webshell, parent; + + aLoader->GetContainer(getter_AddRefs(container)); // Is this a frame ? - webshell = do_QueryInterface(aObserver); + webshell = do_QueryInterface(container); if (webshell) { webshell->GetParent(*getter_AddRefs(parent)); } @@ -1609,8 +1611,7 @@ nsBrowserAppCore::HandleUnknownContentType(nsIDocumentLoader* loader, NS_IMETHODIMP nsBrowserAppCore::OnStartURLLoad(nsIDocumentLoader* loader, - nsIChannel* channel, - nsIContentViewer* aViewer) + nsIChannel* channel) { return NS_OK; } diff --git a/mozilla/xpfe/browser/src/nsBrowserInstance.h b/mozilla/xpfe/browser/src/nsBrowserInstance.h index 2f9a7156b66..f828f40db32 100644 --- a/mozilla/xpfe/browser/src/nsBrowserInstance.h +++ b/mozilla/xpfe/browser/src/nsBrowserInstance.h @@ -76,8 +76,8 @@ class nsBrowserInstance : public nsIBrowserInstance, // nsIDocumentLoaderObserver NS_IMETHOD OnStartDocumentLoad(nsIDocumentLoader* loader, nsIURI* aURL, const char* aCommand); - NS_IMETHOD OnEndDocumentLoad(nsIDocumentLoader* loader, nsIChannel* channel, nsresult aStatus, nsIDocumentLoaderObserver* aObserver); - NS_IMETHOD OnStartURLLoad(nsIDocumentLoader* loader, nsIChannel* channel, nsIContentViewer* aViewer); + NS_IMETHOD OnEndDocumentLoad(nsIDocumentLoader* loader, nsIChannel* channel, nsresult aStatus); + NS_IMETHOD OnStartURLLoad(nsIDocumentLoader* loader, nsIChannel* channel); NS_IMETHOD OnProgressURLLoad(nsIDocumentLoader* loader, nsIChannel* channel, PRUint32 aProgress, PRUint32 aProgressMax); NS_IMETHOD OnStatusURLLoad(nsIDocumentLoader* loader, nsIChannel* channel, nsString& aMsg); NS_IMETHOD OnEndURLLoad(nsIDocumentLoader* loader, nsIChannel* channel, nsresult aStatus);