More accurate tracking of chrome shells.

git-svn-id: svn://10.0.0.236/trunk@33171 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
hyatt%netscape.com 1999-05-28 22:26:48 +00:00
parent 8ab04357b8
commit 6e23c7709d
2 changed files with 14 additions and 18 deletions

View File

@ -791,19 +791,17 @@ nsHTMLFrameInnerFrame::CreateWebShell(nsIPresContext& aPresContext,
mWebShell->SetWebShellType(parentType);
}
// Make sure all shells have links back to the outermost chrome
// Make sure all shells have links back to the nearest enclosing chrome
// shell.
nsCOMPtr<nsIWebShell> chromeShell;
outerShell->GetContainingChromeShell(getter_AddRefs(chromeShell));
if (!chromeShell)
chromeShell = dont_QueryInterface(outerShell);
// Make sure the outermost shell is chrome, and only set up
// this link if it is.
nsWebShellType chromeShellType;
chromeShell->GetWebShellType(chromeShellType);
outerShell->GetWebShellType(chromeShellType);
if (chromeShellType == nsWebShellChrome)
mWebShell->SetContainingChromeShell(chromeShell);
chromeShell = dont_QueryInterface(outerShell);
else outerShell->GetContainingChromeShell(getter_AddRefs(chromeShell));
mWebShell->SetContainingChromeShell(chromeShell);
#endif // INCLUDE_XUL

View File

@ -791,19 +791,17 @@ nsHTMLFrameInnerFrame::CreateWebShell(nsIPresContext& aPresContext,
mWebShell->SetWebShellType(parentType);
}
// Make sure all shells have links back to the outermost chrome
// Make sure all shells have links back to the nearest enclosing chrome
// shell.
nsCOMPtr<nsIWebShell> chromeShell;
outerShell->GetContainingChromeShell(getter_AddRefs(chromeShell));
if (!chromeShell)
chromeShell = dont_QueryInterface(outerShell);
// Make sure the outermost shell is chrome, and only set up
// this link if it is.
nsWebShellType chromeShellType;
chromeShell->GetWebShellType(chromeShellType);
outerShell->GetWebShellType(chromeShellType);
if (chromeShellType == nsWebShellChrome)
mWebShell->SetContainingChromeShell(chromeShell);
chromeShell = dont_QueryInterface(outerShell);
else outerShell->GetContainingChromeShell(getter_AddRefs(chromeShell));
mWebShell->SetContainingChromeShell(chromeShell);
#endif // INCLUDE_XUL