зеркало из https://github.com/mozilla/pjs.git
Bug 171274: check shell type for primary content frames. r=/sr=jst,hyatt, a=drivers
This commit is contained in:
Родитель
f245816215
Коммит
788957ef92
|
@ -450,17 +450,8 @@ nsFrameLoader::EnsureDocShell()
|
|||
}
|
||||
}
|
||||
|
||||
if (isContent) {
|
||||
// The web shell's type is content.
|
||||
|
||||
docShellAsItem->SetItemType(nsIDocShellTreeItem::typeContent);
|
||||
} else {
|
||||
// Inherit our type from our parent webshell. If it is
|
||||
// chrome, we'll be chrome. If it is content, we'll be
|
||||
// content.
|
||||
|
||||
docShellAsItem->SetItemType(parentType);
|
||||
}
|
||||
PRInt32 shellType = isContent ? nsIDocShellTreeItem::typeContent : parentType;
|
||||
docShellAsItem->SetItemType(shellType);
|
||||
|
||||
parentAsNode->AddChild(docShellAsItem);
|
||||
|
||||
|
@ -469,7 +460,8 @@ nsFrameLoader::EnsureDocShell()
|
|||
parentAsItem->GetTreeOwner(getter_AddRefs(parentTreeOwner));
|
||||
|
||||
if(parentTreeOwner) {
|
||||
PRBool is_primary = value.Equals(NS_LITERAL_STRING("content-primary"));
|
||||
PRBool is_primary = shellType == nsIDocShellTreeItem::typeChrome &&
|
||||
value.Equals(NS_LITERAL_STRING("content-primary"));
|
||||
|
||||
parentTreeOwner->ContentShellAdded(docShellAsItem, is_primary,
|
||||
value.get());
|
||||
|
|
|
@ -683,7 +683,10 @@ nsHTMLFrameOuterFrame::AttributeChanged(nsIPresContext* aPresContext,
|
|||
nsCOMPtr<nsIDocShellTreeOwner> parentTreeOwner;
|
||||
parentAsItem->GetTreeOwner(getter_AddRefs(parentTreeOwner));
|
||||
if (parentTreeOwner) {
|
||||
PRInt32 shellType;
|
||||
parentAsItem->GetItemType(&shellType);
|
||||
PRBool is_primary_content =
|
||||
shellType == nsIDocShellTreeItem::typeChrome &&
|
||||
value.EqualsIgnoreCase("content-primary");
|
||||
|
||||
parentTreeOwner->ContentShellAdded(docShellAsItem, is_primary_content,
|
||||
|
|
|
@ -683,7 +683,10 @@ nsHTMLFrameOuterFrame::AttributeChanged(nsIPresContext* aPresContext,
|
|||
nsCOMPtr<nsIDocShellTreeOwner> parentTreeOwner;
|
||||
parentAsItem->GetTreeOwner(getter_AddRefs(parentTreeOwner));
|
||||
if (parentTreeOwner) {
|
||||
PRInt32 shellType;
|
||||
parentAsItem->GetItemType(&shellType);
|
||||
PRBool is_primary_content =
|
||||
shellType == nsIDocShellTreeItem::typeChrome &&
|
||||
value.EqualsIgnoreCase("content-primary");
|
||||
|
||||
parentTreeOwner->ContentShellAdded(docShellAsItem, is_primary_content,
|
||||
|
|
Загрузка…
Ссылка в новой задаче