diff --git a/layout/base/nsPresShell.cpp b/layout/base/nsPresShell.cpp index d8b3b5650563..d633de195116 100644 --- a/layout/base/nsPresShell.cpp +++ b/layout/base/nsPresShell.cpp @@ -2801,6 +2801,8 @@ PresShell::ResizeReflow(nscoord aWidth, nscoord aHeight) nsContainerFrame::PositionFrameView(mPresContext, rootFrame); rootFrame->Reflow(mPresContext, desiredSize, reflowState, status); rootFrame->SizeTo(mPresContext, desiredSize.width, desiredSize.height); + mPresContext->SetVisibleArea(nsRect(0,0,desiredSize.width,desiredSize.height)); + nsIView* view; rootFrame->GetView(mPresContext, &view); if (view) { diff --git a/layout/html/base/src/nsPresShell.cpp b/layout/html/base/src/nsPresShell.cpp index d8b3b5650563..d633de195116 100644 --- a/layout/html/base/src/nsPresShell.cpp +++ b/layout/html/base/src/nsPresShell.cpp @@ -2801,6 +2801,8 @@ PresShell::ResizeReflow(nscoord aWidth, nscoord aHeight) nsContainerFrame::PositionFrameView(mPresContext, rootFrame); rootFrame->Reflow(mPresContext, desiredSize, reflowState, status); rootFrame->SizeTo(mPresContext, desiredSize.width, desiredSize.height); + mPresContext->SetVisibleArea(nsRect(0,0,desiredSize.width,desiredSize.height)); + nsIView* view; rootFrame->GetView(mPresContext, &view); if (view) {