From b37b8cb7488c2b70eb2da0e9148ef1845571ccb7 Mon Sep 17 00:00:00 2001 From: "tbogard%aol.net" Date: Sat, 27 Nov 1999 03:11:10 +0000 Subject: [PATCH] nsHTMLDocument now uses the nsIBaseWindow interface off the WebShell object to do positioning stuff instead of nsIWebShell interface. git-svn-id: svn://10.0.0.236/trunk@54496 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/content/html/document/src/nsHTMLDocument.cpp | 12 ++++++------ mozilla/layout/html/document/src/nsHTMLDocument.cpp | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/mozilla/content/html/document/src/nsHTMLDocument.cpp b/mozilla/content/html/document/src/nsHTMLDocument.cpp index 7bd9b201ad2..17521d2f0ec 100644 --- a/mozilla/content/html/document/src/nsHTMLDocument.cpp +++ b/mozilla/content/html/document/src/nsHTMLDocument.cpp @@ -53,6 +53,7 @@ #include "nsIContentViewer.h" #include "nsIMarkupDocumentViewer.h" #include "nsIWebShell.h" +#include "nsIBaseWindow.h" #include "nsIWebShellServices.h" #include "nsIDocumentLoader.h" #include "CNavDTD.h" @@ -695,14 +696,13 @@ NS_IMETHODIMP nsHTMLDocument::SetTitle(const nsString& aTitle) nsIPresShell* shell = (nsIPresShell*) mPresShells.ElementAt(i); nsCOMPtr cx; shell->GetPresContext(getter_AddRefs(cx)); - nsISupports* container; - if (NS_OK == cx->GetContainer(&container)) { - if (nsnull != container) { - nsCOMPtr webShell = do_QueryInterface(container); - if (webShell) { + nsCOMPtr container; + if (NS_OK == cx->GetContainer(getter_AddRefs(container))) { + if (container) { + nsCOMPtr webShell(do_QueryInterface(container)); + if(webShell) { webShell->SetTitle(aTitle.GetUnicode()); } - NS_RELEASE(container); } } } diff --git a/mozilla/layout/html/document/src/nsHTMLDocument.cpp b/mozilla/layout/html/document/src/nsHTMLDocument.cpp index 7bd9b201ad2..17521d2f0ec 100644 --- a/mozilla/layout/html/document/src/nsHTMLDocument.cpp +++ b/mozilla/layout/html/document/src/nsHTMLDocument.cpp @@ -53,6 +53,7 @@ #include "nsIContentViewer.h" #include "nsIMarkupDocumentViewer.h" #include "nsIWebShell.h" +#include "nsIBaseWindow.h" #include "nsIWebShellServices.h" #include "nsIDocumentLoader.h" #include "CNavDTD.h" @@ -695,14 +696,13 @@ NS_IMETHODIMP nsHTMLDocument::SetTitle(const nsString& aTitle) nsIPresShell* shell = (nsIPresShell*) mPresShells.ElementAt(i); nsCOMPtr cx; shell->GetPresContext(getter_AddRefs(cx)); - nsISupports* container; - if (NS_OK == cx->GetContainer(&container)) { - if (nsnull != container) { - nsCOMPtr webShell = do_QueryInterface(container); - if (webShell) { + nsCOMPtr container; + if (NS_OK == cx->GetContainer(getter_AddRefs(container))) { + if (container) { + nsCOMPtr webShell(do_QueryInterface(container)); + if(webShell) { webShell->SetTitle(aTitle.GetUnicode()); } - NS_RELEASE(container); } } }