mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-13 18:27:35 +00:00
Now that the content viewer supports the SizeToContent, we can farm the work off onto it. r=hyatt
This commit is contained in:
parent
0c7c21b07d
commit
1aa3d662b7
@ -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<nsIContentViewer> cv;
|
||||
mDocShell->GetContentViewer(getter_AddRefs(cv));
|
||||
nsCOMPtr<nsIMarkupDocumentViewer> markupViewer(do_QueryInterface(cv));
|
||||
if(markupViewer)
|
||||
markupViewer->SizeToContent();
|
||||
}
|
||||
|
||||
// Here's where we service the "show" request initially given in Initialize()
|
||||
OnChromeLoaded();
|
||||
|
Loading…
Reference in New Issue
Block a user