Bug 402264: When we're scaling printed content, don't scale unconstrained heights. r+sr=roc a=damons

This commit is contained in:
dholbert@cs.stanford.edu 2008-04-10 15:34:38 -07:00
parent 48d147ec82
commit 595fdb4786

View File

@ -110,7 +110,9 @@ NS_IMETHODIMP nsPageFrame::Reflow(nsPresContext* aPresContext,
avHeight);
float scale = aPresContext->GetPageScale();
maxSize.width = NSToCoordCeil(maxSize.width / scale);
maxSize.height = NSToCoordCeil(maxSize.height / scale);
if (maxSize.height != NS_UNCONSTRAINEDSIZE) {
maxSize.height = NSToCoordCeil(maxSize.height / scale);
}
// Get the number of Twips per pixel from the PresContext
nscoord onePixelInTwips = nsPresContext::CSSPixelsToAppUnits(1);
// insurance against infinite reflow, when reflowing less than a pixel