Closed Bug 1730091 Opened 9 months ago Closed 4 months ago

Text cut off in print view with magnification

Categories

(Core :: Print Preview, defect, P3)

Firefox 92
defect

Tracking

()

RESOLVED FIXED
98 Branch
Tracking Status
firefox98 --- fixed

People

(Reporter: s.nakano, Assigned: alaskanemily)

References

Details

Attachments

(2 files)

User Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.63 Safari/537.36

Steps to reproduce:

Firefox Ver91で印刷プレビューの倍率を130%だとヘッダー、フッターも問題なく表示され本文も見切れることはなく印刷が可能であるが、Ver92で倍率を130%にするとヘッダーやフッターも大きくなり本文が見切れてしまう。

[Google Translation] In Firefox Ver91, if the magnification of the print preview is 130%, the header and footer are displayed without problems and the text can be printed without being cut off, but if the magnification is set to 130% in Ver92, the header and footer become large and the text is cut off.

Actual results:

解決手段なし

[Google Translation] No solution

Expected results:

Firefoのバグと重れる

[Google Translation] It is heavy and Firefox bug

The Bugbug bot thinks this bug is invalid.
If you think the bot is wrong, please reopen the bug and move it back to its prior component.

Be aware this is a production bug database used by the Mozilla community to develop Firefox, and other products.
Filing test bugs here wastes the time of all our contributors, volunteers, as well as paid employees.
If you continue to abuse bugzilla.mozilla.org your account will be disabled.

Status: UNCONFIRMED → RESOLVED
Closed: 9 months ago
Component: Untriaged → General
Product: Firefox → Invalid Bugs
Resolution: --- → INVALID
Version: Firefox 92 → unspecified
Status: RESOLVED → UNCONFIRMED
Resolution: INVALID → ---
Component: General → Printing
Product: Invalid Bugs → Toolkit

Steps to reproduce:
In Firefox Ver91, if the magnification of the print preview is 130%, the header and footer are displayed without problems and the text can be printed without being cut off, but if the magnification is set to 130% in Ver92, the header and footer become large and the text is cut off. It ends up.

Component: Printing → General
Product: Toolkit → Invalid Bugs
Component: General → Printing
Product: Invalid Bugs → Toolkit
Summary: print view → Text cut off in print view with magnification

The severity field is not set for this bug.
:mstriemer, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(mstriemer)
Attached image image.png
Flags: needinfo?(mstriemer)

After printing this page that showed the rendering bug in the preview, the physical paper has the header correctly displayed

Component: Printing → Print Preview
Product: Toolkit → Core
Version: unspecified → Firefox 92
See Also: → 1732836

This looks to be somewhat related to the issue in bug 1732836, where the same issue with the header/footer was noted too. I can take a look at this.

Severity: -- → S3
Flags: needinfo?(emcdonough)
Priority: -- → P3
See Also: → 1743321

I believe the issue is that the scaling rect is being set without concern to scale when painting the header/footer, here: https://searchfox.org/mozilla-central/rev/aecfc48870599adb0ffc077dd11e6e2d99820d38/layout/generic/nsPageFrame.cpp#651

I have a reduced test case and should have a fix for this soon.

Flags: needinfo?(emcdonough)

The text is already truncated elsewhere to ensure that it does not overrun its
box, and the rect setting code did not take scale into account.

Add a print preview test to ensure this fixes the original bug.

Assignee: nobody → emcdonough
Status: UNCONFIRMED → NEW
Ever confirmed: true
Attachment #9260526 - Attachment description: Bug 1730091 - Remove redundant clipping rect setting that is missing scaling factor when drawing header/footers for printing → Bug 1730091 - Do not apply the scaling factor that accounts for nsPageContentFrame scaling to headers/footers
Pushed by emcdonough@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8c4414cc1e61
Do not apply the scaling factor that accounts for nsPageContentFrame scaling to headers/footers r=dholbert

Backed out for causing failures on test_printpreview.xhtml

[task 2022-02-03T01:04:47.086Z] 01:04:47     INFO - TEST-FAIL | layout/base/tests/chrome/test_printpreview.xhtml | REFERENCE: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAhUAAAIVCAYAAABm5A1+AAAgAElEQVR4Xu3dyZJc5dGA4VM9d8srltyEARsIL+yrwBuvPA8MtrGNJ+EJj2w9zzaeF9wCNwD3ge+ASZL5/1MRR1EUjVr61JmVCY8iKiSI/upLnsSK192NzurjH//4m5MfBAgQIECAAIG7FFiJirsUdJwAAQIECBBYC4gK/yIQIECAAAEClyIgKi6F0ZsQIECAAAECoqLJvwNvvvn2b3057+81+ccxJgECBIYEVqvV286d9/eG3tyhuxYQFXdNGP8Gm[..]
[task 2022-02-03T01:04:47.086Z] 01:04:47     INFO - Buffered messages finished
[task 2022-02-03T01:04:47.087Z] 01:04:47     INFO - TEST-UNEXPECTED-FAIL | layout/base/tests/chrome/test_printpreview.xhtml | Printing data:text/html,<!-- runTest46 --> and printpreview_bug1730091_ref.html should produce the same results - got false, expected true
[task 2022-02-03T01:04:47.087Z] 01:04:47     INFO - SimpleTest.is@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:500:14
[task 2022-02-03T01:04:47.087Z] 01:04:47     INFO - compareFiles@chrome://mochitests/content/chrome/layout/base/tests/chrome/printpreview_helper.xhtml:487:5
[task 2022-02-03T01:04:47.087Z] 01:04:47     INFO - GECKO(1804) | MEMORY STAT | vsize 16523MB | residentFast 491MB | heapAllocated 201MB
[task 2022-02-03T01:04:47.088Z] 01:04:47     INFO - GECKO(1804) | [Parent 1804, Main Thread] WARNING: '!inner', file /builds/worker/checkouts/gecko/dom/ipc/jsactor/JSWindowActorProtocol.cpp:184
[task 2022-02-03T01:04:47.088Z] 01:04:47     INFO - GECKO(1804) | [Parent 1804, Main Thread] WARNING: '!inner', file /builds/worker/checkouts/gecko/dom/ipc/jsactor/JSWindowActorProtocol.cpp:184
[task 2022-02-03T01:04:47.089Z] 01:04:47     INFO - GECKO(1804) | [Parent 1804, Main Thread] WARNING: '!inner', file /builds/worker/checkouts/gecko/dom/ipc/jsactor/JSWindowActorProtocol.cpp:184
[task 2022-02-03T01:04:47.089Z] 01:04:47     INFO - GECKO(1804) | [Parent 1804, Main Thread] WARNING: '!inner', file /builds/worker/checkouts/gecko/dom/ipc/jsactor/JSWindowActorProtocol.cpp:184
[task 2022-02-03T01:04:47.089Z] 01:04:47     INFO - TEST-OK | layout/base/tests/chrome/test_printpreview.xhtml | took 17855ms
Flags: needinfo?(emcdonough)
Pushed by emcdonough@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/3b9e17543a27
Do not apply the scaling factor that accounts for nsPageContentFrame scaling to headers/footers r=dholbert
Flags: needinfo?(emcdonough)
Status: NEW → RESOLVED
Closed: 9 months ago4 months ago
Resolution: --- → FIXED
Target Milestone: --- → 98 Branch
You need to log in before you can comment on or make changes to this bug.