From dfca085423f19af2cdc6165730626d80dd1f4555 Mon Sep 17 00:00:00 2001 From: "tbogard%aol.net" Date: Mon, 15 Nov 1999 23:48:27 +0000 Subject: [PATCH] Changed GetContainer to be performed off the nsIDocShell parent rather than try to QI to nsIContentViewerContainer. git-svn-id: svn://10.0.0.236/trunk@53568 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/docshell/base/nsDocShell.cpp | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/mozilla/docshell/base/nsDocShell.cpp b/mozilla/docshell/base/nsDocShell.cpp index f5206d70625..a054c41db21 100644 --- a/mozilla/docshell/base/nsDocShell.cpp +++ b/mozilla/docshell/base/nsDocShell.cpp @@ -98,9 +98,20 @@ NS_IMETHODIMP nsDocShell::Create(nsISupports* aOuter, const nsIID& aIID, // nsDocShell::nsISupports //***************************************************************************** -NS_IMPL_ISUPPORTS7(nsDocShell, nsIDocShell, nsIDocShellEdit, - nsIDocShellFile, nsIGenericWindow, nsIScrollable, nsITextScroll, - nsIHTMLDocShell) +NS_IMPL_ADDREF(nsDocShell) +NS_IMPL_RELEASE(nsDocShell) + +NS_IMPL_QUERY_HEAD(nsDocShell) + NS_IMPL_QUERY_BODY(nsIDocShell) + NS_IMPL_QUERY_BODY(nsIHTMLDocShell) + NS_IMPL_QUERY_BODY(nsIDocShellEdit) + NS_IMPL_QUERY_BODY(nsIDocShellFile) + NS_IMPL_QUERY_BODY(nsIGenericWindow) + NS_IMPL_QUERY_BODY(nsIScrollable) + NS_IMPL_QUERY_BODY(nsITextScroll) +// NS_IMPL_QUERY_BODY(nsIInterfaceRequestor) +NS_IMPL_QUERY_TAIL(nsIDocShell) + //***************************************************************************** // nsDocShell::nsIDocShell @@ -1945,11 +1956,8 @@ NS_IMETHODIMP nsDocShell::InsertDocumentInDocTree() if (parent) { // Get the document object for the parent - nsCOMPtr parentAsContentViewerContainer; - parentAsContentViewerContainer = do_QueryInterface(parent); - NS_ENSURE_TRUE(parentAsContentViewerContainer, NS_ERROR_FAILURE); nsCOMPtr parentContentViewer; - NS_ENSURE_SUCCESS(parentAsContentViewerContainer->GetContentViewer(getter_AddRefs(parentContentViewer)), + NS_ENSURE_SUCCESS(parent->GetContentViewer(getter_AddRefs(parentContentViewer)), NS_ERROR_FAILURE); NS_ENSURE_TRUE(parentContentViewer, NS_ERROR_FAILURE); nsCOMPtr parentDocViewer;