Split nsIContentViewer::destroy into close and destroy so we can trigger teardown both at the beginning and at the end of paint suppression. Move the PresShell's teardown from its destructor into EndObservingDocument so it happens at the end of paint suppression. b=80203,89626 r=hyatt sr=waterson

git-svn-id: svn://10.0.0.236/trunk@99882 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
dbaron%fas.harvard.edu
2001-07-25 04:30:59 +00:00
parent d2272204dd
commit 502a5c94aa
10 changed files with 375 additions and 361 deletions

View File

@@ -169,28 +169,7 @@ public:
NS_IMETHOD StartLoad(nsIRequest* request, nsIStreamListener*& aResult);
// nsIContentViewer
NS_IMETHOD Init(nsIWidget* aParentWidget,
nsIDeviceContext* aDeviceContext,
const nsRect& aBounds);
NS_IMETHOD SetContainer(nsISupports* aContainer);
NS_IMETHOD GetContainer(nsISupports** aContainerResult);
NS_IMETHOD LoadStart(nsISupports* aDoc);
NS_IMETHOD LoadComplete(nsresult aStatus);
NS_IMETHOD Unload(void);
NS_IMETHOD Destroy(void);
NS_IMETHOD Stop(void);
NS_IMETHOD GetDOMDocument(nsIDOMDocument **aResult);
NS_IMETHOD SetDOMDocument(nsIDOMDocument *aDocument);
NS_IMETHOD GetBounds(nsRect& aResult);
NS_IMETHOD SetBounds(const nsRect& aBounds);
NS_IMETHOD GetPreviousViewer(nsIContentViewer** aViewer);
NS_IMETHOD SetPreviousViewer(nsIContentViewer* aViewer);
NS_IMETHOD Move(PRInt32 aX, PRInt32 aY);
NS_IMETHOD Show();
NS_IMETHOD Hide();
NS_IMETHOD Validate();
NS_IMETHOD SetEnableRendering(PRBool aOn);
NS_IMETHOD GetEnableRendering(PRBool* aResult);
NS_DECL_NSICONTENTVIEWER
// nsIContentViewerEdit
NS_DECL_NSICONTENTVIEWEREDIT
@@ -435,6 +414,12 @@ PluginViewerImpl::Unload(void)
return NS_OK;
}
NS_IMETHODIMP
PluginViewerImpl::Close(void)
{
return NS_OK;
}
NS_IMETHODIMP
PluginViewerImpl::Destroy(void)
{
@@ -558,6 +543,8 @@ PluginViewerImpl::GetPreviousViewer(nsIContentViewer** aViewer)
NS_IMETHODIMP
PluginViewerImpl::SetPreviousViewer(nsIContentViewer* aViewer)
{
if (aViewer)
aViewer->Destroy();
return NS_OK;
}