container queries don't work when printing (aside from paint-time effects), due to nsPageSequenceFrame refusuing to reflow more than once
Categories
(Core :: Printing: Output, defect)
Tracking
()
People
(Reporter: pinage404+bugzilla.mozilla.org, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(4 files)
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:145.0) Gecko/20100101 Firefox/145.0
Steps to reproduce:
I have a container query that add a display grid
I attached a file to reproduce
Actual results:
Everything is fine on a screen but the element with a display: grid; appears empty in print mode
I tried on Firefox 145.0.1 (64 bits) and Zen Browser 1.17.9b (Firefox 145.0.1) (64 bits) on :
- system:
"x86_64-linux" - host os:
Linux 6.12.58, NixOS, 25.05 (Warbler), 25.05.20251124.1c8ba8d - multi-user?:
yes - sandbox:
yes - version:
nix-env (Nix) 2.28.5 - nixpkgs:
/nix/store/79nihxkkd2gix5y4ijf0zmyznx04lghn-source
Expected results:
The print mode should display like the screen mode
| Reporter | ||
Comment 1•20 hours ago
|
||
| Reporter | ||
Comment 2•20 hours ago
|
||
Comment 3•20 hours 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 4•15 hours ago
|
||
I suspect this has to do with how container-queries work with layout/restyle/layout interleaving, mixed with the fact that our print-reflow codepath avoids incremental reflow entirely -- specifically this early-return where nsPageSequenceFrame::Reflow bails if it's been reflowed previously:
https://searchfox.org/firefox-main/rev/5a5b3741981250310f4327537f18879559779f9c/layout/generic/nsPageSequenceFrame.cpp#294-299
Comment 5•14 hours ago
|
||
Here's a testcase with a container-query that has some paint effects (changing color/background) as well as some layout effects (changing height/width)
We successfully apply the paint effects but not the layout effects. So this is a good clue that we're successfully restyling but not managing to make it through another reflow to update the frame tree sizes, as suspected in my previous comment.
Updated•14 hours ago
|
Description
•