This commit is contained in:
Jim Mathies 2010-07-15 21:47:52 -05:00
commit 40cf61b306
3 changed files with 1 additions and 31 deletions

View File

@ -110,7 +110,6 @@
#include "nsCopySupport.h"
#include "nsIDOMHTMLFrameSetElement.h"
#ifdef MOZ_XUL
#include "nsIXULWindow.h"
#include "nsIXULDocument.h"
#include "nsXULPopupManager.h"
#endif
@ -1943,24 +1942,7 @@ DocumentViewerImpl::Show(void)
}
}
// XXX - If this DocumentViewer belongs to an nsIXULWindow that will at some
// point in the future call 'Show' on its window, we shouldn't call it.
// See bug 574690.
nsCOMPtr<nsIDocShellTreeItem> treeItem = do_QueryReferent(mContainer);
nsCOMPtr<nsIXULWindow> xulWin;
PRBool willShowWindow = PR_FALSE;
if (treeItem) {
nsCOMPtr<nsIDocShellTreeOwner> owner;
treeItem->GetTreeOwner(getter_AddRefs(owner));
if (owner) {
xulWin = do_GetInterface(owner);
if (xulWin) {
xulWin->WillShowWindow(&willShowWindow);
}
}
}
if (mWindow && !willShowWindow) {
if (mWindow) {
mWindow->Show(PR_TRUE);
}

View File

@ -149,10 +149,4 @@ interface nsIXULWindow : nsISupports
* docshell could cause problems.
*/
[noscript] void applyChromeFlags();
/**
* This will return true if this nsIXULWindow will call show on its
* widget once it has finished loading chrome.
*/
PRBool willShowWindow();
};

View File

@ -2064,12 +2064,6 @@ NS_IMETHODIMP nsXULWindow::ApplyChromeFlags()
return NS_OK;
}
NS_IMETHODIMP nsXULWindow::WillShowWindow(PRBool *aRetval)
{
*aRetval = mShowAfterLoad && !mChromeLoaded;
return NS_OK;
}
NS_IMETHODIMP nsXULWindow::GetXULBrowserWindow(nsIXULBrowserWindow * *aXULBrowserWindow)
{
NS_IF_ADDREF(*aXULBrowserWindow = mXULBrowserWindow);