Open Bug 1835782 Opened 1 year ago

Consider merging ComputeSinglePPSPageSizeScale and ComputePagesPerSheetAndPageSizeTransform

Categories

(Core :: Printing: Setup, task, P3)

task

Tracking

()

People

(Reporter: jwatt, Unassigned)

Details

nsPageFrame::ComputeSinglePPSPageSizeScale and ComputePagesPerSheetAndPageSizeTransform both effectively both do work to figure out how to transform pages to their available space on their sheet, in the former case for a single page-per-sheet, in the latter for multiple pages-per-sheet. It would be preferable for the logic to be in a single place. It also might give us more consistent margin handling, depending on whether/how we want to treat margins for single/multiple pages-per-sheet.

One way to do this might be to give PrintedSheetFrame an anonymous container to contain the nsPageFrames, then in the single page-per-sheet case the "grid" would just contain a single cell that is the border/content box of the PrintedSheetFrame, and then the page could be transformed into it using ComputePagesPerSheetAndPageSizeTransform. Or something like that...

See the comment for ComputeSinglePPSPageSizeScale, the comment for ComputePagesPerSheetGridMetrics and the code in ComputePagesPerSheetAndPageSizeTransform.

You need to log in before you can comment on or make changes to this bug.