Closed Bug 1816554 Opened 2 years ago Closed 1 year ago

If the first page of a Google doc is landscape, subsequent portrait pages are printed landscape

Categories

(Core :: Printing: Output, defect)

defect

Tracking

()

RESOLVED DUPLICATE of bug 1853455

People

(Reporter: jwatt, Unassigned, NeedInfo)

References

Details

Attachments

(1 file, 1 obsolete file)

Attached file Reduced testcase (obsolete) —

Duplicate of bug 1816086?

I think this may be a bad interaction with the changes from bug 1800546, or something like that.

Specifically, we call GetDefaultPageSizeOrientation and pass a named page, end up using the style rules that apply for a named page, and then save that via the aPO->mPresContext->SetPageSize(pageSize) call. That is then used as the default page size for all pages later on.

We want the default page size to come from the style rules that would apply as the base, so in the testcase:

@page {
  size: 8.5in 11in;
  margin: 0;
  visibility: hidden
}

(In reply to Marco Castelluccio [:marco] from comment #2)

Duplicate of bug 1816086?

Actually, no, not in this case. That bug is due to the pref layout.css.allow-mixed-page-sizes being disabled. This bug is about things being broken in a specific set of circumstances when that pref is enabled.

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

For more information, please visit auto_nag documentation.

Flags: needinfo?(dholbert)

Triaging as S3, on the assumption that it requires additional steps (e.g. UA-spoofing) to actually trigger this on Google Docs.

jwatt/Emily, please adjust severity if you disagree (e.g. if this is currently or imminently user-facing).

Severity: -- → S3
Flags: needinfo?(dholbert)
Attached file reduced testcase

Reposting the testcase, to fix the doctype tag (it was missing the "!", fixed now)

I don't think this changes behavior, but it makes frame trees slightly easier to read -- no Block(doctype) frames for the unrecognized html tag. :)

Attachment #9317487 - Attachment is obsolete: true
See Also: → 1859616

The behavior of the attached testcase here changed recently, as of bug 1853455.

Rendering of "reduced testcase" (comment 7) in print-preview in Nightly:
Prior to bug 1853455's fix: one landscape page, one blank portrait page, and then a bunch more landscape pages.
After bug 1853455's fix: one landscape page, one blank portrait page, and then all the remaining content on portrait-oriented pages.

The "After" behavior is the expected result, aside from the blank page.

The "one blank portrait page" page issue is bug 1819335, I think. (Notably, it goes away after I remove the page-break-after: always styling; so it seems to be caused by adjacent pagebreaks caused by named-page fragmentation and page-break-after fragmentation. And that's bug 1819335.)

So I think this issue here was essentially a dupe of bug 1853455.

Status: NEW → RESOLVED
Closed: 1 year ago
Duplicate of bug: 1853455
Resolution: --- → DUPLICATE

[transferred gsuite-blocking-status (bug 1521655) to dupe target.]

No longer blocks: 1521655

Similar question as bug 1816086: is it worth/feasible adding a test with the attached testcase?

Flags: needinfo?(dholbert)

Yeah, we should probably add a testcase. Looks like the dupe-target removed an expected-fail annotation for WPT page-size-008-print.html, which tests different page sizes, but not different page-orientations.

As long as page-orientation is exposed in reftest-paged and WPT-print-tests (not sure, I'll check), it'd be worth adding another test to cover this bug's situation.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: