Closed Bug 1717703 Opened 3 years ago Closed 3 years ago

Printing with a page-size that causes vertical scaling results in clipped content

Categories

(Core :: Printing: Output, defect, P2)

defect

Tracking

()

RESOLVED FIXED
92 Branch
Tracking Status
firefox-esr91 --- fixed
firefox90 --- wontfix
firefox91 --- wontfix
firefox92 --- fixed

People

(Reporter: alaskanemily, Assigned: alaskanemily)

References

Details

Attachments

(2 files)

Any divs fully outside the pres context's paper size are not shown. It seems that there is some extra clipping occurring when printing, besides just the reflow size of the nsPageContentFrame.

This isn't a serious issue as using page-size is currently behind a pref anyway.

The actual content frames are scaled down when this is too large, so no
overdraw will occur.

This test couldn't succeed without the fix for the clipping issue.

Attachment #9230380 - Attachment description: Bug 1717703 Part 2 - Add test for down-scaled page-size → Bug 1717703 Part 2 - Add test for printing with down-scaled page-size.
See Also: → 1720621

Same bug here. Firefox 90

when auto scaling is on in Print dialog. Scaled Page on the left gets cut of

added in my print.css

body {
transform-origin: 0 0;
transform: scale(.65); //thats what i need
}

so the print dialog has nothing to scale...

Then the Printout is okay

(In reply to James Shagall from comment #3)

body {
transform-origin: 0 0;
transform: scale(.65); //thats what i need
}

so the print dialog has nothing to scale...

Then the Printout is okay

I had a similar thought and created a bookmarklet along those lines. https://support.mozilla.org/en-US/questions/1343808#answer-1427945 It prevents the horizontal and vertical truncation even with "Fit to page width" but the content doesn't flow naturally, in the sense that there is extra blank space at the bottom of the pages. So definitely not a complete workaround (not to mention the inconvenience...).

Pushed by emcdonough@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1a2bbe277586 Part 1 - Set display list clipping rect for nsPageFrame children to use the content size. r=emilio,mattwoodrow https://hg.mozilla.org/integration/autoland/rev/f46839a3cf86 Part 2 - Add test for printing with down-scaled page-size. r=dholbert
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 92 Branch

The patch landed in nightly and beta is affected.
:alaskanemily, is this bug important enough to require an uplift?
If not please set status_beta to wontfix.

For more information, please visit auto_nag documentation.

Flags: needinfo?(emcdonough)

No big need to uplift, this only affects page-size which is still behind a pref.

Flags: needinfo?(emcdonough)
Regressions: 1722890

(In reply to Emily McDonough [:alaskanemily] from comment #8)

No big need to uplift, this only affects page-size which is still behind a pref.

This turned out not to be quite true -- or rather, we've discovered there's a related issue that this bug's patch happens to also fix, which is not pref-dependent. See bug 1744724, which is a case where we're getting clipped content when printing with 2 Pages-per-Sheet in ESR91. mozregression says the patch here fixed that issue.

We might want to consider uplifting this (together with the fix for bug 1722890) to ESR, to avoid dataloss when printing with pages-per-sheet there.

I ran mozregression to determine when the dupe-bug's described issue first occurred, and it seems to have been regressed by bug 1700379, specifically https://hg.mozilla.org/integration/autoland/rev/029a5e8fa8f3 .

That's not entirely surprising; that bug had another similar-sounding regression filed (with scaled content being clipped), which was fixed via bug 1720621's patch. That patch did get uplifted to 91esr; but unfortunately it did not address this pages-per-sheet issue that we've just uncovered (bug 1744724) -- that issue is fixed by the patch here instead.

Given the simplicity of the patch here (and followup bug 1722890): I tend to think we should uplift this (and the followup) to ESR, to fix the dataloss issue discussed in bug 1744724 (which is a regression that was newly introduced in Firefox 90 via bug 1700379).

Emily, does that sound reasonable to you? And would you mind doing the uplift-nominations, assuming you agree?

Flags: needinfo?(emcdonough)

I can nominate this for uplift, but we would also need to uplift bug 1732836 as well or else this won't be fixed for scaling factors over 100%.

Flags: needinfo?(emcdonough)

Comment on attachment 9230379 [details]
Bug 1717703 Part 1 - Set display list clipping rect for nsPageFrame children to use the content size.

ESR Uplift Approval Request

  • If this is not a sec:{high,crit} bug, please state case for ESR consideration: This bug causes content to be lost when printing with scaled pages or multiple pages per sheet. This bug did introduce a regression which will require bug 1732836 and bug 1722890 to also be uplifted.
  • User impact if declined: Content is cut off when printing on pages with a scaling factor.
  • Fix Landed on Version: 92
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): The change has been in releases for months with no new issues.
  • String or UUID changes made by this patch:
Attachment #9230379 - Flags: approval-mozilla-esr91?
Attachment #9230380 - Flags: approval-mozilla-esr91?

Comment on attachment 9230379 [details]
Bug 1717703 Part 1 - Set display list clipping rect for nsPageFrame children to use the content size.

Fixes more printing issues than originally anticipated. Approved for 91.5esr.

Attachment #9230379 - Flags: approval-mozilla-esr91? → approval-mozilla-esr91+
Attachment #9230380 - Flags: approval-mozilla-esr91? → approval-mozilla-esr91+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: