diff --git a/layout/generic/nsGfxScrollFrame.cpp b/layout/generic/nsGfxScrollFrame.cpp index d99bf58daef..845b2c30195 100644 --- a/layout/generic/nsGfxScrollFrame.cpp +++ b/layout/generic/nsGfxScrollFrame.cpp @@ -3092,7 +3092,14 @@ ScrollFrameHelper::BuildDisplayList(nsDisplayListBuilder* aBuilder, // // This is not compatible when using containes for root scrollframes. MOZ_ASSERT(couldBuildLayer && mScrolledFrame->GetContent()); + bool needToRecomputeAGR = false; + if (!mWillBuildScrollableLayer) { + needToRecomputeAGR = true; + } mWillBuildScrollableLayer = true; + if (needToRecomputeAGR) { + aBuilder->RecomputeCurrentAnimatedGeometryRoot(); + } } }