diff --git a/layout/generic/nsGfxScrollFrame.cpp b/layout/generic/nsGfxScrollFrame.cpp index 539cddeceff4..e6199aae6723 100644 --- a/layout/generic/nsGfxScrollFrame.cpp +++ b/layout/generic/nsGfxScrollFrame.cpp @@ -3708,8 +3708,7 @@ void ScrollFrameHelper::BuildDisplayList(nsDisplayListBuilder* aBuilder, // of the viewport, so most layer implementations would create a layer buffer // that's much larger than necessary. Creating independent layers for each // scrollbar works around the problem. - bool createLayersForScrollbars = - mIsRoot && mOuter->PresContext()->IsRootContentDocument(); + bool createLayersForScrollbars = isRootContent; nsIScrollableFrame* sf = do_QueryFrame(mOuter); MOZ_ASSERT(sf);