Bug 171274: check parent shell type for primary content frames. r=dbaron, sr=jst, a=drivers

This commit is contained in:
jaggernaut%netscape.com 2002-10-25 00:00:54 +00:00
Родитель 4a9151d91e
Коммит a596e22ded
3 изменённых файлов: 8 добавлений и 1 удалений

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

@ -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,