зеркало из https://github.com/mozilla/pjs.git
Make hiding a frame with display:none really hide the docshell all the way.
Bug 308182, r=biesi, sr=jst
This commit is contained in:
Родитель
cef902562c
Коммит
69c105eceb
|
@ -3820,12 +3820,12 @@ nsDocShell::SetVisibility(PRBool aVisibility)
|
|||
if (!mContentViewer)
|
||||
return NS_OK;
|
||||
if (aVisibility) {
|
||||
NS_ENSURE_SUCCESS(EnsureContentViewer(), NS_ERROR_FAILURE);
|
||||
mContentViewer->Show();
|
||||
}
|
||||
else if (mContentViewer)
|
||||
else {
|
||||
mContentViewer->Hide();
|
||||
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -571,11 +571,20 @@ nsSubDocumentFrame::Destroy(nsPresContext* aPresContext)
|
|||
// can safely go away when this frame is destroyed.
|
||||
|
||||
content_viewer->SetSticky(PR_FALSE);
|
||||
|
||||
// Hide the content viewer now that the frame is going away...
|
||||
|
||||
content_viewer->Hide();
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIBaseWindow> baseWin = do_QueryInterface(docShell);
|
||||
NS_ASSERTION(baseWin, "Docshell must be an nsIBaseWindow");
|
||||
|
||||
// Now reverse the steps we took in ShowDocShell(). But don't call
|
||||
// Destroy(); that will be handled by destroying our frame loader, if
|
||||
// needed.
|
||||
|
||||
// Hide the content viewer now that the frame is going away...
|
||||
baseWin->SetVisibility(PR_FALSE);
|
||||
|
||||
// Clear out the parentWidget, since it's about to die with us
|
||||
baseWin->SetParentWidget(nsnull);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче