diff --git a/layout/base/nsCSSFrameConstructor.cpp b/layout/base/nsCSSFrameConstructor.cpp index 765932b4cbce..516cf9a25110 100644 --- a/layout/base/nsCSSFrameConstructor.cpp +++ b/layout/base/nsCSSFrameConstructor.cpp @@ -3710,7 +3710,8 @@ nsCSSFrameConstructor::ConstructRootFrame(nsIPresShell* aPresShell, nsIFrame* parentFrame = viewportFrame; - if (isScrollable) { + // It should be scrollable.. and it also can not be paginated + if (isScrollable && !isPaginated) { // built the frame. We give it the content we are wrapping which is the document, // the root frame, the parent view port frame, and we should get back the new diff --git a/layout/html/style/src/nsCSSFrameConstructor.cpp b/layout/html/style/src/nsCSSFrameConstructor.cpp index 765932b4cbce..516cf9a25110 100644 --- a/layout/html/style/src/nsCSSFrameConstructor.cpp +++ b/layout/html/style/src/nsCSSFrameConstructor.cpp @@ -3710,7 +3710,8 @@ nsCSSFrameConstructor::ConstructRootFrame(nsIPresShell* aPresShell, nsIFrame* parentFrame = viewportFrame; - if (isScrollable) { + // It should be scrollable.. and it also can not be paginated + if (isScrollable && !isPaginated) { // built the frame. We give it the content we are wrapping which is the document, // the root frame, the parent view port frame, and we should get back the new