fixed positioned (bottom offset-ed) footer isn't print-ed out
Categories
(Core :: Printing: Output, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox-esr78 | --- | unaffected |
| firefox-esr91 | --- | verified |
| firefox90 | --- | unaffected |
| firefox91 | --- | unaffected |
| firefox92 | --- | verified |
| firefox93 | --- | verified |
People
(Reporter: foysal.mamun.lifo, Assigned: alaskanemily)
References
(Regression)
Details
(Keywords: regression)
Attachments
(4 files)
|
5.66 KB,
text/html
|
Details | |
|
469 bytes,
text/html
|
Details | |
|
48 bytes,
text/x-phabricator-request
|
RyanVM
:
approval-mozilla-beta+
RyanVM
:
approval-mozilla-esr91+
|
Details | Review |
|
48 bytes,
text/x-phabricator-request
|
RyanVM
:
approval-mozilla-beta+
RyanVM
:
approval-mozilla-esr91+
|
Details | Review |
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:90.0) Gecko/20100101 Firefox/90.0
Steps to reproduce:
save to pdf a page where page width is fixed to 965px and fixed positioned footer.
css is :
.footer {
position: fixed;
bottom: 0;
clear: both;
}
and for example body width is
<body style="width: 965px;">
Actual results:
footer is not displayed on save to pdf
Expected results:
footer should be displayed as before version 90
| Reporter | ||
Comment 1•4 years ago
|
||
If i set the body width to 700px then footer print perfectly.
Comment 2•4 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Firefox::PDF Viewer' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Comment 3•4 years ago
|
||
Mozregression says this was caused by bug 1717703: https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=0d307662db0f5204ea6286e95e885d8ab12c57e8&tochange=f46839a3cf869168e295850f9fea9f854f2122c8
Emily can you take a look?
Updated•4 years ago
|
Comment 4•4 years ago
|
||
This reduced testcase reproduces the bug for me, if I print-preview it at a 90% scale factor (using the "Scale" setting in the More Settings print-preview option.)
This bug specifically happens when we are printing at a less-than-100% scale factor. In the original testcase, we were hitting that codepath because of the wide width on the body, which triggers downscaling for the default "shrink to fit page width" option. But you can also trigger this bug more directly by simply choosing a specific <100% scale factor. E.g. with the attached testcase, "Scale: 90%" triggers the issue.
I'm guessing we're messing something up when pruning our display list for items that can be entirely clipped. We must not be taking the scale-down factor into consideration when determining whether the item is visible or not.
Comment 5•4 years ago
|
||
Note that the "Footer" text does seem to be positioned at the correct spot; it's just that we incorrectly prune it from our paintable stuff, probably because we think it's outside of the painted area, because we must be making some "filter out any out-of-bounds display items" pruning-pass without taking the Scale into consideration.
If you add an explicit and sufficiently-large height to the footer, then that works around this bug & makes the footer show up, presumably because some of it makes it back into the area that we think is painted.
Comment 6•4 years ago
•
|
||
My guess: we probably need to be scaling pageContentRect (or maybe just its size component?) by pc->GetPageScale() in the new code that bug 1717703 added. (I think this GetPageScale() is the scale that corresponds to this print Scale: [...] factor.)
Updated•4 years ago
|
Comment 7•4 years ago
|
||
Set release status flags based on info from the regressing bug 1717703
| Reporter | ||
Comment 8•4 years ago
|
||
(In reply to Daniel Holbert [:dholbert] from comment #4)
Created attachment 9234328 [details]
testcase 2 (further reduced)This reduced testcase reproduces the bug for me, if I print-preview it at a 90% scale factor (using the "Scale" setting in the More Settings print-preview option.)
This bug specifically happens when we are printing at a less-than-100% scale factor. In the original testcase, we were hitting that codepath because of the wide
widthon the body, which triggers downscaling for the default "shrink to fit page width" option. But you can also trigger this bug more directly by simply choosing a specific <100% scale factor. E.g. with the attached testcase, "Scale: 90%" triggers the issue.I'm guessing we're messing something up when pruning our display list for items that can be entirely clipped. We must not be taking the scale-down factor into consideration when determining whether the item is visible or not.
Yes, I get the footer at 90% scale but other contents are clipped since it has a fixed width (965px).
| Assignee | ||
Comment 9•4 years ago
|
||
| Assignee | ||
Comment 10•4 years ago
|
||
| Assignee | ||
Comment 11•4 years ago
|
||
dholbert was right, the issue was that we were not applying the page scale to the clipping rect for each page content frame. This patch should fix that.
Updated•4 years ago
|
Updated•4 years ago
|
Comment 12•4 years ago
|
||
Comment 13•4 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/b660fa9270e3
https://hg.mozilla.org/mozilla-central/rev/c69cd7bad3a9
Comment 14•4 years ago
|
||
Please nominate this for Beta approval when you get a chance.
| Assignee | ||
Comment 15•4 years ago
•
|
||
Comment on attachment 9235695 [details]
Bug 1722890 Part 1 - Apply page scaling to the clipping rect for page content frames
Beta/Release Uplift Approval Request
- User impact if declined: Printing with certain scaling levels will cause clipped content
- Is this code covered by automated tests?: No
- Has the fix been verified in Nightly?: Yes
- Needs manual test from QE?: Yes
- If yes, steps to reproduce: Enter print preview with https://bugzilla.mozilla.org/attachment.cgi?id=9234328 and scale output to 90%. The footer box should still be visible.
- List of other uplifts needed: None
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): The change is small and self-contained. It should at worst just not catch all cases of this bug, but I was not able to reproduce any further examples.
- String changes made/needed:
| Assignee | ||
Updated•4 years ago
|
Comment 16•4 years ago
|
||
Comment on attachment 9235695 [details]
Bug 1722890 Part 1 - Apply page scaling to the clipping rect for page content frames
Approved for 92.0b4.
Updated•4 years ago
|
Comment 17•4 years ago
|
||
| bugherder uplift | ||
Updated•4 years ago
|
Comment 18•4 years ago
|
||
Reproduced the issue on Firefox 92.0a1 (2021-07-29) under macOS 11.5 using the testcase provided in Comment 0.
The issue is fixed on 93.0a1 (2021-08-15) and 92.0b4. Tests were performed on macOS 11.5, Windows 10 and Ubuntu 20.04.
| Assignee | ||
Comment 19•3 years ago
|
||
Comment on attachment 9235695 [details]
Bug 1722890 Part 1 - Apply page scaling to the clipping rect for page content frames
ESR Uplift Approval Request
- If this is not a sec:{high,crit} bug, please state case for ESR consideration: This bug is needed to fix a regression caused by bug 1717703. However, this introduces another regression which must be fixed by also uplifting bug 1732836.
- User impact if declined: Printing with certain scaling levels will content to be is cut off.
- Fix Landed on Version: 92
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): This is a relatively small change which has been tested and landed on Nightly/Release for some time, and the known regression will be fixed with 1732836.
- String or UUID changes made by this patch:
| Assignee | ||
Updated•3 years ago
|
Comment 20•3 years ago
|
||
Comment on attachment 9235695 [details]
Bug 1722890 Part 1 - Apply page scaling to the clipping rect for page content frames
Needed for bug 1717703, approved for 91.5esr.
Updated•3 years ago
|
Updated•3 years ago
|
Comment 21•3 years ago
|
||
| bugherder uplift | ||
Updated•3 years ago
|
Comment 22•3 years ago
|
||
Verified that the issue is fixed in Firefox ESR 91.5.0. Tests were performed on macOS 12.0.1, Windows 11 and Ubuntu 20.04.
Description
•