[css3-page] @page :first pseudo-class resulting in wrong sheet orientation when printing ranges
Categories
(Core :: Printing: Output, defect, P3)
Tracking
()
People
(Reporter: jwatt, Unassigned)
References
(Blocks 2 open bugs)
Details
An @page :first
rule should apply only to the first page in the full list of pages that are visible in print preview, before the user changes the Pages
field to Custom
and enters a range that does not include the first page. If the user selects a range that does not include that original first page then the rule should not be applied to the first page that is visible in print preview.
![]() |
Reporter | |
Comment 1•1 year ago
|
||
This is happening because in nsPageSequenceFrame::Reflow
we try to get the dimensions we'll use for the PrintedSheetFrame by calling sheet->ComputeSheetSize()
before reflowing the sheet and its pages. PrintedSheetFrame::ComputeSheetSize
just looks at its PrincipalChildList().FirstChild()
and gets the style from that, without any knowledge of which pages may be skipped. It isn't until TagIfSkippedByCustomRange is called when PrintedSheetFrame reflows its nsPageFrames that we know whether pages are going to be skipped or not.
To fix this we really need to stop trying to calculate the sheet dimensions ahead of time to pass down when reflowing sheets and pages. They should be ignoring that information nowadays anyway, now that we scale pages to fit into their sheet/sheet grid properly.
![]() |
Reporter | |
Comment 2•1 year ago
|
||
Ugh, ComputeSinglePPSPageSizeScale is still called during reflow, and relies on the reflow input.
Description
•