content-visibility: auto invisible in printing/preview
Categories
(Core :: Printing: Output, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox130 | --- | verified |
People
(Reporter: kronthto, Assigned: jfkthame)
Details
Attachments
(2 files)
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:127.0) Gecko/20100101 Firefox/127.0
Steps to reproduce:
Tried to print a webpage which optimises performance using content-visibility:auto on a list of elements/articles.
Demo: https://kronthto.de/content-visibility-example.html
Actual results:
The contents are not visible in the print preview. However, the height is reserved, resulting in a few empty pages. It appears that the page does not "know" that something bigger than the browser viewport is looking at it.
Expected results:
Chrome renders and paints all content when entering print mode, I expected to also see the contents / the skipping of painting should not happen.
Comment 1•2 months 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.
Assignee | ||
Comment 2•2 months ago
|
||
Yeah, this is rather broken. If I adjust settings in the print preview panel (causing the preview to update), some of the content does start to appear -- but still not all of it, generally. And it's absent from the actual output (tested with Save to PDF) as well.
Assignee | ||
Comment 3•2 months ago
|
||
A simple fix here would be to check for print/preview mode in nsStyleDisplay::ContentVisibility(), and resolve auto
to visible
there.
(Alternatively, maybe this should be handled in style_adjuster.rs? But the Gecko-side fix seems particularly trivial.)
Assignee | ||
Comment 4•2 months ago
|
||
Updated•2 months ago
|
Comment 7•2 months ago
|
||
bugherder |
Updated•1 month ago
|
I was able to reproduce the issue using Firefox 127.0.2 on Windows 11, while following the steps described in Comment 0.
Verified as fixed using Firefox 130.0b5, on Windows 11, MacOS 14.4 and Ubuntu 22.04. The content is now visible in Print Preview (and also in the saved PDF).
Description
•