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:
parent
aea1de05df
commit
1174e8e035
@ -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;
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user