diff --git a/layout/base/nsLayoutUtils.cpp b/layout/base/nsLayoutUtils.cpp index ab8e2dcfe875..72095f88f40e 100644 --- a/layout/base/nsLayoutUtils.cpp +++ b/layout/base/nsLayoutUtils.cpp @@ -2226,8 +2226,6 @@ nsLayoutUtils::PaintFrame(nsRenderingContext* aRenderingContext, nsIFrame* aFram } } - bool ignoreViewportScrolling = - aFrame->GetParent() ? false : presShell->IgnoringViewportScrolling(); nsRegion visibleRegion; if (aFlags & PAINT_WIDGET_LAYERS) { // This layer tree will be reused, so we'll need to calculate it @@ -2275,6 +2273,8 @@ nsLayoutUtils::PaintFrame(nsRenderingContext* aRenderingContext, nsIFrame* aFram } nsRect canvasArea(nsPoint(0, 0), aFrame->GetSize()); + bool ignoreViewportScrolling = + aFrame->GetParent() ? false : presShell->IgnoringViewportScrolling(); if (ignoreViewportScrolling && rootScrollFrame) { nsIScrollableFrame* rootScrollableFrame = presShell->GetRootScrollFrameAsScrollable();