Open Bug 1763246 Opened 2 years ago Updated 8 months ago

Headers and footers are clipped, with @page { size: a3 }

Categories

(Core :: Printing: Output, defect)

defect

Tracking

()

ASSIGNED
Tracking Status
firefox-esr91 --- wontfix
firefox-esr102 --- wontfix
firefox104 --- wontfix
firefox105 --- wontfix
firefox106 --- wontfix
firefox107 --- wontfix
firefox108 --- fix-optional

People

(Reporter: dholbert, Assigned: jwatt)

References

(Regression)

Details

(Keywords: regression)

Attachments

(4 files)

Attached file testcase 1

STR:

  1. Print-preview the attached testcase.
  2. Choose "Paper Size: US Letter" or "A4" in our print dialog.

ACTUAL RESULTS:
The top-right header is clipped or missing entirely.
The footers are missing entirely.

EXPECTED RESULTS:
No such clipping.

Flags: needinfo?(emcdonough)
Severity: -- → S3
Type: task → defect

Here's a screenshot, showing two side-by-side attempts at this, to illustrate that this is worse for short URIs since the top-right header (the URI) gets fully-clipped in that case.

Note:

  • if you choose A3 as your output paper size, then everything works fine.
  • if you choose Tabloid as your output paper size, then things are almost-fine; the footers show up on the bottom, but the right edge of the top-right and lower-right footer get clipped. (This sort of makes sense, since I think Tabloid is taller-and-slightly-skinnier than A3)
  • All the other paper sizes seem to be problematic here (since I think they're all smaller than A3)
See Also: → 1763030

Running mozregression with the layout.css.page-size.enabled pref manually enabled (to avoid bisecting to the pref-default-enabling commit), I got this regression range:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=61b00062dcdd41077516b098afe63fd49ba44187&tochange=4aee63294f3940bf9b80611a4e6989700a558386

...which is just bug 1647851.

(In "good" builds before that, it looks like we're just ignoring the specified page size, basically, which trivially prevents the clipping issue.)

Depends on: 1647851

Note regarding the potential for sites to hit this: twitter bootstrap used to include @page{size:a3} (e.g. as part of the file styles.css in bug 1759775's zipped-up testcase, which declares itself to be "Bootstrap v4.5.3")

However, that seems to have been removed as part of Bootstrap version 5, in this commit:
https://github.com/twbs/bootstrap/commit/473689ce5de5337984c16a9c5dacad328101ffb1#diff-108a57a50d5ebe203f447ef7bf1e5e53826bdb82baab2baa2b41b4158cdd4d09L1133

FWIW, I just ran into this again in the wild (again with @page{size:a3}) at https://sanmateo-ca.county-taxes.com/public/search/gsgx_property_tax

If I print-preview that page (or other pages on that domain, e.g. property-tax receipts/statements), I hit this issue, unless I explicitly choose A3-size paper as my print target in the print-preview dialog.

(I think jwatt is working on this, assigning to him to reflect reality.)

Assignee: nobody → jwatt
Status: NEW → ASSIGNED
Flags: needinfo?(emcdonough)

(In reply to Daniel Holbert [:dholbert] from comment #4)

Note regarding the potential for sites to hit this: twitter bootstrap used to include @page{size:a3} [...]
However, that seems to have been removed as part of Bootstrap version 5, in this commit:

Historical note: the choice of A3 seemed curious, so I chased this back a bit further to see when this was added. It comes from this pull-request/commit:
https://github.com/twbs/bootstrap/pull/25164
https://github.com/twbs/bootstrap/pull/25164/commits/9fa23d33d8e76a69545c9db9e67107a48f68d28d#diff-108a57a50d5ebe203f447ef7bf1e5e53826bdb82baab2baa2b41b4158cdd4d09R886
"Add basic print styles for page and body size to create a semi-consistent print experience across browsers"

It doesn't seem like the choice of A3 was particularly thought-through - it just happened to produce a more consistent print-scale across browsers (those that supported @page) at the time.

Anyway: for the purposes of this bug here, @page { size: a3} is only relevant insomuch as it's a size that's larger than the actual print target that I have available (larger than the size that I choose in the print dropdown per STR). We should be able to repro/test this bug using @page { size: letter } etc. as long as the user-selected print target is something smaller.

For completeness, here's a testcase to demonstrate the @page { size: letter } scenario.

Setting Regressed by field after analyzing regression range found by mozregression in comment #3.

Regressed by: 1647851

Set release status flags based on info from the regressing bug 1647851

Set release status flags based on info from the regressing bug 1647851

(In reply to Daniel Holbert [:dholbert] from comment #6)

(I think jwatt is working on this, assigning to him to reflect reality.)

Hey jwatt, is this accurate or is this lower priority?

Duplicate of this bug: 1830942
See Also: → 1859926
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: