diff --git a/layout/base/FrameLayerBuilder.cpp b/layout/base/FrameLayerBuilder.cpp index bd622a54dad..b9e0c7208c3 100644 --- a/layout/base/FrameLayerBuilder.cpp +++ b/layout/base/FrameLayerBuilder.cpp @@ -1690,6 +1690,10 @@ ContainerState::FindFixedPosFrameForLayerData(const nsIFrame* aAnimatedGeometryR result = f; break; } + if (f == mContainerReferenceFrame) { + // The metadata will go on an ancestor layer if necessary. + return nullptr; + } } if (!result) { return nullptr;