Fix bug 159268 (hiding and reshowing an iframe regression). r=sicking,

sr=jst, a=asa


git-svn-id: svn://10.0.0.236/trunk@125907 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bzbarsky%mit.edu 2002-07-26 23:11:19 +00:00
parent c99a7fc274
commit 28b1505b87
2 changed files with 10 additions and 20 deletions

View File

@ -706,6 +706,11 @@ nsHTMLFrameInnerFrame::Destroy(nsIPresContext* aPresContext)
docShell->GetContentViewer(getter_AddRefs(content_viewer));
if (content_viewer) {
// Mark the content viewer as non-sticky so that the presentation
// 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();
@ -1024,16 +1029,6 @@ nsHTMLFrameInnerFrame::ShowDocShell(nsIPresContext* aPresContext)
return NS_OK;
}
nsCOMPtr<nsIContentViewer> content_viewer;
docShell->GetContentViewer(getter_AddRefs(content_viewer));
if (content_viewer) {
// Mark the content viewer as non-sticky so that the presentation
// can safely go away when this frame is destroyed.
content_viewer->SetSticky(PR_FALSE);
}
nsCOMPtr<nsIContent> content;
GetParentContent(getter_AddRefs(content));

View File

@ -706,6 +706,11 @@ nsHTMLFrameInnerFrame::Destroy(nsIPresContext* aPresContext)
docShell->GetContentViewer(getter_AddRefs(content_viewer));
if (content_viewer) {
// Mark the content viewer as non-sticky so that the presentation
// 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();
@ -1024,16 +1029,6 @@ nsHTMLFrameInnerFrame::ShowDocShell(nsIPresContext* aPresContext)
return NS_OK;
}
nsCOMPtr<nsIContentViewer> content_viewer;
docShell->GetContentViewer(getter_AddRefs(content_viewer));
if (content_viewer) {
// Mark the content viewer as non-sticky so that the presentation
// can safely go away when this frame is destroyed.
content_viewer->SetSticky(PR_FALSE);
}
nsCOMPtr<nsIContent> content;
GetParentContent(getter_AddRefs(content));