Bug 588407. Put top level content documents in a container layer. r=roc

This commit is contained in:
Timothy Nikkel 2010-08-21 19:55:55 -05:00
Родитель 5011a6ce34
Коммит 1ffa751871
1 изменённых файлов: 8 добавлений и 0 удалений

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

@ -483,7 +483,15 @@ nsSubDocumentFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
new (aBuilder) nsDisplayZoom(subdocRootFrame, &childItems,
subdocAPD, parentAPD);
childItems.AppendToTop(zoomItem);
} else if (!nsContentUtils::IsChildOfSameType(presShell->GetDocument())) {
// We always want top level content documents to be in their own layer.
// If we need a zoom item then we are good because it creates a layer. If
// not then create our own layer.
nsDisplayOwnLayer* layerItem = new (aBuilder) nsDisplayOwnLayer(
subdocRootFrame ? subdocRootFrame : this, &childItems);
childItems.AppendToTop(layerItem);
}
// Clip children to the child root frame's rectangle
rv = aLists.Content()->AppendNewToTop(
new (aBuilder) nsDisplayClip(this, this, &childItems,