зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
c4555bdd9f
Коммит
12859e8881
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче