зеркало из https://github.com/mozilla/pjs.git
Bug 171274: check parent shell type for primary content frames. r=dbaron, sr=jst, a=drivers
This commit is contained in:
Родитель
4a9151d91e
Коммит
a596e22ded
|
@ -469,7 +469,8 @@ nsFrameLoader::EnsureDocShell()
|
|||
parentAsItem->GetTreeOwner(getter_AddRefs(parentTreeOwner));
|
||||
|
||||
if(parentTreeOwner) {
|
||||
PRBool is_primary = value.Equals(NS_LITERAL_STRING("content-primary"));
|
||||
PRBool is_primary = parentType == 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 parentType;
|
||||
parentAsItem->GetItemType(&parentType);
|
||||
PRBool is_primary_content =
|
||||
parentType == 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 parentType;
|
||||
parentAsItem->GetItemType(&parentType);
|
||||
PRBool is_primary_content =
|
||||
parentType == nsIDocShellTreeItem::typeChrome &&
|
||||
value.EqualsIgnoreCase("content-primary");
|
||||
|
||||
parentTreeOwner->ContentShellAdded(docShellAsItem, is_primary_content,
|
||||
|
|
Загрузка…
Ссылка в новой задаче