diff --git a/layout/base/nsDisplayList.cpp b/layout/base/nsDisplayList.cpp index f5aa423e234..06a33f89aa4 100644 --- a/layout/base/nsDisplayList.cpp +++ b/layout/base/nsDisplayList.cpp @@ -4696,7 +4696,8 @@ already_AddRefed nsDisplayTransform::BuildLayer(nsDisplayListBuilder *aBu return nullptr; } - uint32_t flags = ShouldPrerenderTransformedContent(aBuilder, mFrame, false) ? + bool prerender = ShouldPrerenderTransformedContent(aBuilder, mFrame, false); + uint32_t flags = prerender ? FrameLayerBuilder::CONTAINER_NOT_CLIPPED_BY_ANCESTORS : 0; nsRefPtr container = aManager->GetLayerBuilder()-> BuildContainerLayerFor(aBuilder, aManager, mFrame, this, mStoredList.GetChildren(), @@ -4717,7 +4718,7 @@ already_AddRefed nsDisplayTransform::BuildLayer(nsDisplayListBuilder *aBu nsDisplayListBuilder::AddAnimationsAndTransitionsToLayer(container, aBuilder, this, mFrame, eCSSProperty_transform); - if (ShouldPrerenderTransformedContent(aBuilder, mFrame, false)) { + if (prerender) { container->SetUserData(nsIFrame::LayerIsPrerenderedDataKey(), /*the value is irrelevant*/nullptr); container->SetContentFlags(container->GetContentFlags() | Layer::CONTENT_MAY_CHANGE_TRANSFORM);