Landing (inside an INCLUDE_XUL ifdef) the code that checks for and sets

the type of the web shell (to distinguish chrome frames from content
frames).
This commit is contained in:
hyatt%netscape.com 1999-04-16 08:14:28 +00:00
Родитель 71aa7ba55c
Коммит 417d0db772
2 изменённых файлов: 44 добавлений и 2 удалений

Просмотреть файл

@ -662,7 +662,7 @@ nsHTMLFrameInnerFrame::CreateWebShell(nsIPresContext& aPresContext,
aPresContext.GetCompatibilityMode(&mode);
mWebShell->SetScrolling(GetScrolling(content, mode));
mWebShell->SetIsFrame(PR_TRUE);
nsString frameName;
if (GetName(content, frameName)) {
mWebShell->SetName(frameName);
@ -679,6 +679,27 @@ nsHTMLFrameInnerFrame::CreateWebShell(nsIPresContext& aPresContext,
if (nsnull != outerShell) {
outerShell->AddChild(mWebShell);
#ifdef INCLUDE_XUL
// Determine whether or not the frame is content or chrome.
nsIAtom* typeAtom = NS_NewAtom("type");
nsAutoString value;
content->GetAttribute(kNameSpaceID_None, typeAtom, value);
if (value.EqualsIgnoreCase("content"))
{
// The web shell's type is content.
mWebShell->SetWebShellType(nsWebShellContent);
}
else
{
// Inherit our type from our parent webshell. If it is
// chrome, we'll be chrome. If it is content, we'll be
// content.
nsWebShellType parentType;
outerShell->GetWebShellType(parentType);
mWebShell->SetWebShellType(parentType);
}
#endif // INCLUDE_XUL
// connect the container...
nsIWebShellContainer* outerContainer = nsnull;
container->QueryInterface(kIWebShellContainerIID, (void**) &outerContainer);

Просмотреть файл

@ -662,7 +662,7 @@ nsHTMLFrameInnerFrame::CreateWebShell(nsIPresContext& aPresContext,
aPresContext.GetCompatibilityMode(&mode);
mWebShell->SetScrolling(GetScrolling(content, mode));
mWebShell->SetIsFrame(PR_TRUE);
nsString frameName;
if (GetName(content, frameName)) {
mWebShell->SetName(frameName);
@ -679,6 +679,27 @@ nsHTMLFrameInnerFrame::CreateWebShell(nsIPresContext& aPresContext,
if (nsnull != outerShell) {
outerShell->AddChild(mWebShell);
#ifdef INCLUDE_XUL
// Determine whether or not the frame is content or chrome.
nsIAtom* typeAtom = NS_NewAtom("type");
nsAutoString value;
content->GetAttribute(kNameSpaceID_None, typeAtom, value);
if (value.EqualsIgnoreCase("content"))
{
// The web shell's type is content.
mWebShell->SetWebShellType(nsWebShellContent);
}
else
{
// Inherit our type from our parent webshell. If it is
// chrome, we'll be chrome. If it is content, we'll be
// content.
nsWebShellType parentType;
outerShell->GetWebShellType(parentType);
mWebShell->SetWebShellType(parentType);
}
#endif // INCLUDE_XUL
// connect the container...
nsIWebShellContainer* outerContainer = nsnull;
container->QueryInterface(kIWebShellContainerIID, (void**) &outerContainer);