Backing out Bug 417356, due to pagination reftest failures.
This commit is contained in:
@@ -198,16 +198,12 @@ nsSimplePageSequenceFrame::Reflow(nsPresContext* aPresContext,
|
||||
|
||||
// now get out margins & edges
|
||||
if (mPageData->mPrintSettings) {
|
||||
nsMargin unwriteableTwips;
|
||||
mPageData->mPrintSettings->GetUnwriteableMarginInTwips(unwriteableTwips);
|
||||
NS_ASSERTION(unwriteableTwips.left >= 0 && unwriteableTwips.top >= 0 &&
|
||||
unwriteableTwips.right >= 0 && unwriteableTwips.bottom >= 0,
|
||||
"Unwriteable twips should be non-negative");
|
||||
|
||||
nsMargin marginTwips;
|
||||
mPageData->mPrintSettings->GetMarginInTwips(marginTwips);
|
||||
mMargin = aPresContext->TwipsToAppUnits(marginTwips + unwriteableTwips);
|
||||
|
||||
mMargin = nsMargin(aPresContext->TwipsToAppUnits(marginTwips.left),
|
||||
aPresContext->TwipsToAppUnits(marginTwips.top),
|
||||
aPresContext->TwipsToAppUnits(marginTwips.right),
|
||||
aPresContext->TwipsToAppUnits(marginTwips.bottom));
|
||||
PRInt16 printType;
|
||||
mPageData->mPrintSettings->GetPrintRange(&printType);
|
||||
mPrintRangeType = printType;
|
||||
@@ -223,7 +219,10 @@ nsSimplePageSequenceFrame::Reflow(nsPresContext* aPresContext,
|
||||
edgeTwips.right = PR_MIN(PR_MAX(edgeTwips.right, 0), inchInTwips);
|
||||
|
||||
mPageData->mEdgePaperMargin =
|
||||
aPresContext->TwipsToAppUnits(edgeTwips + unwriteableTwips);
|
||||
nsMargin(aPresContext->TwipsToAppUnits(edgeTwips.left),
|
||||
aPresContext->TwipsToAppUnits(edgeTwips.top),
|
||||
aPresContext->TwipsToAppUnits(edgeTwips.right),
|
||||
aPresContext->TwipsToAppUnits(edgeTwips.bottom));
|
||||
}
|
||||
|
||||
// *** Special Override ***
|
||||
|
||||
Reference in New Issue
Block a user