зеркало из https://github.com/mozilla/pjs.git
Backing out 'Call Show if our nsIXULWindow will not' patch from bug 574690 due to various regressions. r=bz
This commit is contained in:
Родитель
6942525ccc
Коммит
d35b6a1aad
|
@ -110,7 +110,6 @@
|
|||
#include "nsCopySupport.h"
|
||||
#include "nsIDOMHTMLFrameSetElement.h"
|
||||
#ifdef MOZ_XUL
|
||||
#include "nsIXULWindow.h"
|
||||
#include "nsIXULDocument.h"
|
||||
#include "nsXULPopupManager.h"
|
||||
#endif
|
||||
|
@ -1944,24 +1943,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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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();
|
||||
};
|
||||
|
|
|
@ -2056,12 +2056,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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче