Closed Bug 1874947 Opened 5 months ago Closed 4 months ago

The usePageRuleSizeAsPaperSize internal print-setting only works for page sizes in unnamed page rules

Categories

(Core :: Printing: Output, defect)

defect

Tracking

()

RESOLVED DUPLICATE of bug 1868708
Tracking Status
firefox-esr115 --- unaffected
firefox121 --- unaffected
firefox122 --- wontfix
firefox123 --- wontfix
firefox124 --- wontfix

People

(Reporter: dholbert, Assigned: jwatt)

References

(Regression)

Details

(Keywords: regression)

Attachments

(3 files, 1 obsolete file)

Attached file testcase 1

While getting the WPT in https://phabricator.services.mozilla.com/D198195 to pass locally, AlaskanEmily and I discovered that our internal usePageRuleSizeAsPaperSize mechanism seems to only work if the page size is specified in an unnamed @page rule.

I'll post a testcase/reference case which also function as a WPT.

STR:

  1. Load attached testcase.
  2. Print-preview and select the Save-to-PDF backend.

EXPECTED RESULTS:
Firefox should preview the paper as being 2in by 3in.

ACTUAL RESULTS:
Firefox previews the paper as US Letter or whatever your default size is (and places the 2inx3in page onto that).

Attached file reference case 1

Here's a screenshot showing the STR with testcase vs. reference case.

The main issue is the paper size difference; but one other issue that's also shown here: we allow orientation to be manually chosen for the testcase but not the reference case too, which is also inconsistent & probably wrong.

Attached patch patch to add WPT test (obsolete) — Splinter Review

Here's a patch with attached testcase/reference case (with minor tweaks to fix some nits that I noticed after posting them). We can land this here when this bug is eventually fixed.

Chrome passes this WPT. Firefox fails with:

FAIL /css/css-page/page-name-001-print.html - Testing http://web-platform.test:8000/css/css-page/page-name-001-print.html == http://web-platform.test:8000/css/css-page/page-name-001-ref.html
Got different page sizes; test is 288x480px, ref is 192x288px

This is a recent regression, from bug 1869217.

Bug 1869217 doesn't have a lot of context, but it superficially sounds like this new behavior is ~expected based on the title of that bug. But I think it's probably not exactly what we wanted to achieve there?

Depends on: 1793220
Flags: needinfo?(jwatt)
Keywords: regression
Regressed by: 1869217
See Also: → 1866319

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

Depends on: 1875186
Severity: -- → S3

Comment on attachment 9373121 [details] [diff] [review]
patch to add WPT test

I landed a patch with a WPT for this in bug 1875186. That makes the patch attachment here no longer necessary, since the test now lives in-tree.

Attachment #9373121 - Attachment is obsolete: true

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

I'll get a patch up for this before code freeze.

Assignee: nobody → jwatt
Flags: needinfo?(jwatt)

This wont make a Fx122 release.
Fx123 is in the last week of beta, and goes to release candidate next week.
A patch would need to land by before the end of this week to be considered for uplift to beta.

:jwatt is this gonna ride the 125 trains?

Flags: needinfo?(jwatt)

I don't think this is really a regression.

Basically this is an instance of bug 1868708. Right now our @page code only supports setting the default sheet size. It always has, but with quirk that we would use the first page's @page page size as the default page size (contrary to what makes sense, IMO, and contrary to what other browsers do). The attached testcase used to work because of that (because it was setting the default size, not because we were correctly supporting and setting the size of the first sheet as an individual sheet, which is bug 1868708).

Flags: needinfo?(jwatt)

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

The main issue is the paper size difference; but one other issue that's also shown here: we allow orientation to be manually chosen for the testcase but not the reference case too, which is also inconsistent & probably wrong.

That's just logical fallout from the fact that the test does not set the sheet size (so the UI is not disabled), but the reference does (so the UI is disabled).

(In reply to Dianna Smith [:diannaS] from comment #10)

:jwatt is this gonna ride the 125 trains?

No. We should probably just dupe this to bug 1868708 IMO. I can try to get my patch for that finished off for the next cycle, but it isn't going to be finished for Wednesday.

Status: NEW → RESOLVED
Closed: 4 months ago
Duplicate of bug: 1868708
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: