Closed Bug 1819335 Opened 2 years ago Closed 1 year ago

Extra blank sheets are sometimes inserted when `size: <orientation>` causes an orientation switch

Categories

(Core :: Printing: Output, defect)

defect

Tracking

()

VERIFIED FIXED
121 Branch
Tracking Status
firefox121 --- verified
firefox122 --- verified

People

(Reporter: jwatt, Assigned: alaskanemily)

References

(Blocks 1 open bug)

Details

Attachments

(5 files)

No description provided.

Found this while debugging some Google Docs issues.

One example that demonstrates this is the testcase bug 1816554 (attachment 9317487).

Severity: -- → S3

I'm not sure this actually has anything to do with size or orientation. I think it's just a case where we've got two reasons for a pagebreak -- a named page difference, and page-break-after:always (or break-after:page).

(Google Docs probably runs into it for page-boundaries-that-involve-a-size-change just because there's a difference in named pages at that point.)

Here's a reduced testcase. I think we might already have a bug filed for this, too; I know it's something we've run into in the past, with named pages and forced pagebreaks.

Here's the frame dump from testcase 1. It shows that page 2 just has a PageBreak frame and nothing else. We probably push it there due to the page-name mismatch logic.

Really, we should try to get the PageBreak frame at the end of page 1 (or omit it altogether, if we can tell it'll be unnecessary).

For symmetry, here's a testcase like testcase 1 but now with break-before on the second element, instead of break-after on the first element. We should be sure that our fix handles both of these cases.

Assignee: nobody → emcdonough

Marking this as blocking the gsuite-printing-metabug.

jwatt has a gdocs testcase https://docs.google.com/document/d/1N9kDNCdB-6YLW-Y0fLt_--9LyaN-hvFX4t-B6KoEOe0/edit where this seems to trigger a mostly-blank second page (which, incidentally, gets some weird double-printed overflow from page 1 -- I'll spin off a separate bug for that unexpected overflow).

Blocks: 1521655

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

Marking this as blocking the gsuite-printing-metabug.

jwatt has a gdocs testcase [...] which, incidentally, gets some weird double-printed overflow from page 1 -- I'll spin off a separate bug for that unexpected overflow

--> Filed bug 1859634 on that.

Because the break-after/break-before should cause the new page name to be on
the next page, there should only be one page-break.

One of these cases is still not solved, but the simple case works now.

Duplicate of this bug: 1860675
Blocks: 1795258
Pushed by emcdonough@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7f7ef196a61d Part 1 - Do not create a forced break for CSS named page change immediately before an nsPageBreakFrame. r=dholbert https://hg.mozilla.org/integration/autoland/rev/d171871eb9d2 Part 2 - Add tests for page name change and break-after/break-before at the same point. r=dholbert
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/42851 for changes under testing/web-platform/tests
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 121 Branch
Upstream PR merged by moz-wptsync-bot
Upstream PR was closed without merging
Regressions: 1865172
QA Whiteboard: [qa-121b-p2]

Reproducible on a 2023-10-27 Nightly build on Windows 10, using the testcases from Comment 2 and Comment 4.
Verified as fixed on Firefox 121.0b4 and Nightly 122.0a1 on Windows 10, Ubuntu 22, macOS 12.

Status: RESOLVED → VERIFIED
QA Whiteboard: [qa-121b-p2]
See Also: → 1872292
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: