Fixes width of viewer area in PrintPreview

Bug 109564 r=dcone sr=attinasi


git-svn-id: svn://10.0.0.236/trunk@112286 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
rods%netscape.com 2002-01-16 03:24:09 +00:00
parent aea1de05df
commit 1174e8e035
2 changed files with 10 additions and 2 deletions

View File

@ -347,6 +347,8 @@ nsSimplePageSequenceFrame::Reflow(nsIPresContext* aPresContext,
nscoord x = deadSpaceMargin.left;
nscoord y = deadSpaceMargin.top;// Running y-offset for each page
nsSize reflowPageSize(0,0);
// See if it's an incremental reflow command
if (eReflowReason_Incremental == aReflowState.reason) {
// XXX Skip Incremental reflow,
@ -381,6 +383,8 @@ nsSimplePageSequenceFrame::Reflow(nsIPresContext* aPresContext,
// max width then center it horizontally
ReflowChild(kidFrame, aPresContext, kidSize, kidReflowState, x, y, 0, status);
reflowPageSize.SizeTo(kidSize.width, kidSize.height);
FinishReflowChild(kidFrame, aPresContext, nsnull, kidSize, x, y, 0);
y += kidSize.height;
@ -453,7 +457,7 @@ nsSimplePageSequenceFrame::Reflow(nsIPresContext* aPresContext,
// Return our desired size
aDesiredSize.height = y;
aDesiredSize.width = pageSize.width+deadSpaceMargin.left+shadowSize.width;
aDesiredSize.width = reflowPageSize.width+deadSpaceMargin.right+shadowSize.width+extraMargin.right+extraMargin.left;
aDesiredSize.ascent = aDesiredSize.height;
aDesiredSize.descent = 0;

View File

@ -347,6 +347,8 @@ nsSimplePageSequenceFrame::Reflow(nsIPresContext* aPresContext,
nscoord x = deadSpaceMargin.left;
nscoord y = deadSpaceMargin.top;// Running y-offset for each page
nsSize reflowPageSize(0,0);
// See if it's an incremental reflow command
if (eReflowReason_Incremental == aReflowState.reason) {
// XXX Skip Incremental reflow,
@ -381,6 +383,8 @@ nsSimplePageSequenceFrame::Reflow(nsIPresContext* aPresContext,
// max width then center it horizontally
ReflowChild(kidFrame, aPresContext, kidSize, kidReflowState, x, y, 0, status);
reflowPageSize.SizeTo(kidSize.width, kidSize.height);
FinishReflowChild(kidFrame, aPresContext, nsnull, kidSize, x, y, 0);
y += kidSize.height;
@ -453,7 +457,7 @@ nsSimplePageSequenceFrame::Reflow(nsIPresContext* aPresContext,
// Return our desired size
aDesiredSize.height = y;
aDesiredSize.width = pageSize.width+deadSpaceMargin.left+shadowSize.width;
aDesiredSize.width = reflowPageSize.width+deadSpaceMargin.right+shadowSize.width+extraMargin.right+extraMargin.left;
aDesiredSize.ascent = aDesiredSize.height;
aDesiredSize.descent = 0;