Unexpectedly upscaled page (and fatal assertion for debug build), with >1 pages per sheet and very small page
Categories
(Core :: Printing: Output, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox-esr102 | --- | unaffected |
| firefox113 | --- | unaffected |
| firefox114 | --- | unaffected |
| firefox115 | --- | wontfix |
| firefox116 | --- | wontfix |
| firefox117 | --- | wontfix |
| firefox118 | --- | wontfix |
| firefox119 | --- | wontfix |
People
(Reporter: dholbert, Assigned: jwatt, NeedInfo)
References
(Regression)
Details
(Keywords: regression)
STR:
- Load this testcase:
data:text/html,<style>@page{size: 2in 2in}body{margin:0}</style>Hi
- Ctrl+P to open print preview
- Choose a physical printer as your print target (with US Letter or A4 sized paper)
- Chose pages-per-sheet: 2
ACTUAL RESULTS:
- In a non-debug build: print-preview shows the 2in x 2in page scaled up to be substantially larger (filling half of the physical US Letter or A4 sheet).
- In a debug build: fatal assertion:
Assertion failure: scaleX > 0.0f && scaleX <= 1.0f && scaleY > 0.0f && scaleY <= 1.0f, at layout/generic/nsPageFrame.cpp:587
EXPECTED RESULTS: Page shouldn't be scaled up. Pages-per-sheet is supposed to scale down if needed, but not scale up. And we shouldn't fatally assert.
Essentially right now, our code is assuming that pages-per-sheet printing will always be a downscale. But in fact, if we size the page to fit the grid cell, this may be an up-scale if the page is much smaller than the sheet. So we need to explicitly cap the scale at 1x (and we need to support centering the page in both axes within its grid cell, since this will result in us having extra space in both axes).
This is a regression from bug 1833239.
Comment 1•3 years ago
|
||
Set release status flags based on info from the regressing bug 1833239
Comment 2•3 years ago
|
||
Set release status flags based on info from the regressing bug 1833239
Comment 3•3 years ago
|
||
:jwatt what is the priority on this?
Wondering are there any updates on the investigation or a fix in time for Fx115?
https://whattrainisitnow.com/release/?version=115
| Assignee | ||
Comment 4•3 years ago
|
||
I'm wrapping a fix for this up into bug 1833244. I don't think this bug is a big issues since it's very rare for CSS page sizes to be set in live web content right now, especially for smaller sized pages than the one being printed to. So I don't think we really need a separate fix for this for uplift to 115.
Updated•3 years ago
|
Updated•3 years ago
|
Comment 5•3 years ago
•
|
||
(In reply to Jonathan Watt [:jwatt] from comment #4)
I'm wrapping a fix for this up into bug 1833244. I don't think this bug is a big issues since it's very rare for CSS page sizes to be set in live web content right now, especially for smaller sized pages than the one being printed to. So I don't think we really need a separate fix for this for uplift to 115.
Bug 1833244 landed for Fx117 though the bug has a leave-open.
Is there anything left to do here?
| Reporter | ||
Comment 6•3 years ago
|
||
(In reply to Donal Meehan [:dmeehan] from comment #5)
Bug 1833244 landed for Fx117m though the bug has a leave-open.
Is there anything left to do here?
Yes, this bug here is still un-fixed (and so is bug 1833244). (Only one preliminary piece of Bug 1833244 stayed in for 117, and the rest needs to be fixed up and re-landed, which is on jwatt's radar).
Updated•3 years ago
|
Comment 7•3 years ago
|
||
(In reply to Daniel Holbert [:dholbert] from comment #6)
(In reply to Donal Meehan [:dmeehan] from comment #5)
Bug 1833244 landed for Fx117m though the bug has a leave-open.
Is there anything left to do here?Yes, this bug here is still un-fixed (and so is bug 1833244). (Only one preliminary piece of Bug 1833244 stayed in for 117, and the rest needs to be fixed up and re-landed, which is on jwatt's radar).
Fx118 is now in beta, do we expect a fix for this in time for a safe beta uplift or will this come in a later release?
| Reporter | ||
Comment 8•3 years ago
|
||
I'll redirect that question to jwatt, who I think is working on this.
(Also: for good measure, I just retested this on Nightly 119.0a1 (2023-08-30) and confirmed that it's still affected by this bug.)
Updated•3 years ago
|
Updated•3 years ago
|
| Assignee | ||
Comment 9•2 years ago
|
||
While looking into this, I realised that WPT Print Reftests will need more flexibility to test this. For part of that work I've opened:
Description
•