mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 10:00:54 +00:00
Bug 860971, if changing the visibility changes contentviewer, don't try to proceed in nsFrameLoader::Show, r=bz
This commit is contained in:
parent
7b3c2a732d
commit
e4a38f17fd
@ -819,6 +819,7 @@ nsFrameLoader::Show(int32_t marginWidth, int32_t marginHeight,
|
||||
// "Create"...
|
||||
baseWindow->Create();
|
||||
baseWindow->SetVisibility(true);
|
||||
NS_ENSURE_TRUE(mDocShell, false);
|
||||
|
||||
// Trigger editor re-initialization if midas is turned on in the
|
||||
// sub-document. This shouldn't be necessary, but given the way our
|
||||
|
@ -5475,13 +5475,15 @@ nsDocShell::GetAllowMixedContentAndConnectionData(bool* aRootHasSecureConnection
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::SetVisibility(bool aVisibility)
|
||||
{
|
||||
if (!mContentViewer)
|
||||
// Show()/Hide() may change mContentViewer.
|
||||
nsCOMPtr<nsIContentViewer> cv = mContentViewer;
|
||||
if (!cv)
|
||||
return NS_OK;
|
||||
if (aVisibility) {
|
||||
mContentViewer->Show();
|
||||
cv->Show();
|
||||
}
|
||||
else {
|
||||
mContentViewer->Hide();
|
||||
cv->Hide();
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
|
Loading…
Reference in New Issue
Block a user