Print: content is restricted to narrow width on MacOS
Categories
(Core :: Printing: Output, defect)
Tracking
()
People
(Reporter: fonsvdplas, Assigned: TYLin)
Details
Attachments
(7 files)
Steps to reproduce:
Open the HTML file attached (with file://...
) and press Cmd+P. You can see the issue in the print preview, and in the generated PDF (example output available at https://github.com/fonsp/disorganised-mess/files/10468998/Tower.of.Hanoi.pdf ).
The HTML file is a version-pinned file generated by https://github.com/fonsp/Pluto.jl , a Julia programming environment.
Tested on Firefox MacOS, 105-109 with browserstack.com, and Firefox 109 MacOS locally.
Actual results:
The first pages are correct, but the last pages are mostly blank, and contain squished and occluded content (2 characters wide).
Expected results:
Printing the same document on Firefox Windows or another browser gives the correct result: no blank pages, no squished content.
Reporter | ||
Comment 1•2 years ago
|
||
Example of erroneous output.
Comment 2•2 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Printing: Output' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 3•2 years ago
|
||
This seems to be related to the use of display: flex
... if I remove that property from the top-level <div> element, the print preview looks fine and no longer has the "bad" pages at the end.
cc'ing Daniel, in case this looks at all familiar as a flexbox/fragmentation issue.
Reporter | ||
Comment 4•2 years ago
|
||
I just got the same bug report on Windows, Firefox 109. So it looks like it's not just MacOS.
Comment 5•2 years ago
•
|
||
Yup, it's not macOS-specific -- I think any apparent platform-specific behavior here is just due to font differences which have subtle impacts on the layout.
I'm intending to look at this in more depth soon (hopefully later today), but I did notice earlier that I was able to make it reproduce on Linux with the attached testcase if I increased the print "Scale" to 140
(in the Print Preview dialog "more settings")
Updated•2 years ago
|
Comment 6•2 years ago
|
||
Here's a reduced testcase, I think.
EXPECTED RESULTS: The colorful borders should be on the left & right edges of each page.
ACTUAL RESULTS: On pages 5 and 6, the orange borders are collapsed together; i.e. we think the element has zero (or near-zero) width.
As noted in the testcase, if you set width:100%
to the teal element (the flex item), then the bug goes away. (Which is odd, because that doesn't actually impact the sizing of the element. It has flex:1
which is effectively equivalent to width:100%
in this context.)
Comment 7•2 years ago
|
||
Comment 8•2 years ago
|
||
Assignee | ||
Comment 9•2 years ago
|
||
Assignee | ||
Comment 10•2 years ago
|
||
Testcase 001 and 002 test row-oriented and column-oriented flex container,
respectively. The "a" and "b" variant test box-sizing:border-box
and
box-sizing:content-box
, respectively.
Depends on D170034
Updated•2 years ago
|
Comment 11•2 years ago
|
||
Comment 13•2 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/6364c09acf06
https://hg.mozilla.org/mozilla-central/rev/d8a321301178
Updated•2 years ago
|
Reproducible on a 2023-02-20 Nightly build on macOS 12 using the attached testcase.
Verified as fixed on Firefox 112.0b7(build ID: 20230326180212) and Nightly 113.0a1(build ID: 20230327211143) on macOS 12, Windows 10, Ubuntu 22.
Description
•