From ebf318da9becadb8dc6ee2fc2990314bfa278b58 Mon Sep 17 00:00:00 2001 From: "tbogard%aol.net" Date: Tue, 8 Feb 2000 15:55:46 +0000 Subject: [PATCH] Now that the content viewer supports the SizeToContent, we can farm the work off onto it. r=hyatt git-svn-id: svn://10.0.0.236/trunk@60142 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/xpfe/appshell/src/nsWebShellWindow.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/mozilla/xpfe/appshell/src/nsWebShellWindow.cpp b/mozilla/xpfe/appshell/src/nsWebShellWindow.cpp index f1e9dee070e..95ad04eb17f 100644 --- a/mozilla/xpfe/appshell/src/nsWebShellWindow.cpp +++ b/mozilla/xpfe/appshell/src/nsWebShellWindow.cpp @@ -98,6 +98,8 @@ static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID); #include "nsIBaseWindow.h" #include "nsIDocShellTreeItem.h" +#include "nsIMarkupDocumentViewer.h" + // HACK for M4, should be removed by M5 #ifdef XP_MAC @@ -1497,7 +1499,13 @@ nsWebShellWindow::OnEndDocumentLoad(nsIDocumentLoader* loader, SetBoundsFromXUL(PR_TRUE, PR_TRUE /* !mIntrinsicallySized */); if (mIntrinsicallySized) - mWebShell->SizeToContent(); + { + nsCOMPtr cv; + mDocShell->GetContentViewer(getter_AddRefs(cv)); + nsCOMPtr markupViewer(do_QueryInterface(cv)); + if(markupViewer) + markupViewer->SizeToContent(); + } // Here's where we service the "show" request initially given in Initialize() OnChromeLoaded();