diff --git a/layout/base/FrameLayerBuilder.cpp b/layout/base/FrameLayerBuilder.cpp index 7557e4246830..9f6ddb61bbcf 100644 --- a/layout/base/FrameLayerBuilder.cpp +++ b/layout/base/FrameLayerBuilder.cpp @@ -3847,7 +3847,7 @@ ContainerState::ProcessDisplayItems(nsDisplayList* aList) bool forceInactive; AnimatedGeometryRoot* animatedGeometryRoot; AnimatedGeometryRoot* animatedGeometryRootForClip = nullptr; - if (mFlattenToSingleLayer) { + if (mFlattenToSingleLayer && layerState != LAYER_ACTIVE_FORCE) { forceInactive = true; animatedGeometryRoot = lastAnimatedGeometryRoot; } else { @@ -4848,12 +4848,7 @@ ContainerState::PostprocessRetainedLayers(nsIntRegion* aOpaqueRegionForContainer continue; } - // If mFlattenToSingleLayer is true, there isn't going to be any - // async scrolling so we can apply all our opaqueness to the same - // entry, the entry for mContainerAnimatedGeometryRoot. - AnimatedGeometryRoot* animatedGeometryRootForOpaqueness = - mFlattenToSingleLayer ? mContainerAnimatedGeometryRoot : e->mAnimatedGeometryRoot; - OpaqueRegionEntry* data = FindOpaqueRegionEntry(opaqueRegions, animatedGeometryRootForOpaqueness); + OpaqueRegionEntry* data = FindOpaqueRegionEntry(opaqueRegions, e->mAnimatedGeometryRoot); SetupScrollingMetadata(e); @@ -4875,7 +4870,7 @@ ContainerState::PostprocessRetainedLayers(nsIntRegion* aOpaqueRegionForContainer e->mUntransformedVisibleRegion); if (!e->mOpaqueRegion.IsEmpty()) { - AnimatedGeometryRoot* animatedGeometryRootToCover = animatedGeometryRootForOpaqueness; + AnimatedGeometryRoot* animatedGeometryRootToCover = e->mAnimatedGeometryRoot; if (e->mOpaqueForAnimatedGeometryRootParent && e->mAnimatedGeometryRoot->mParentAGR == mContainerAnimatedGeometryRoot) { animatedGeometryRootToCover = mContainerAnimatedGeometryRoot;