Bug 810592 - Make nsSubDocumentFrames that are actively scrolling build their own layer. r=roc

This commit is contained in:
Matt Woodrow 2012-11-22 18:33:33 +13:00
parent cf76cd1e8e
commit e0d92d15d0

View File

@ -414,7 +414,10 @@ nsSubDocumentFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
childItems.AppendToTop(zoomItem);
}
if (!addedLayer && presContext->IsRootContentDocument()) {
nsIScrollableFrame *sf = presShell->GetRootScrollFrameAsScrollable();
if (!addedLayer &&
(presContext->IsRootContentDocument() ||
(sf && sf->IsScrollingActive()))) {
// We always want top level content documents to be in their own layer.
nsDisplayOwnLayer* layerItem = new (aBuilder) nsDisplayOwnLayer(
aBuilder, subdocRootFrame ? subdocRootFrame : this,