Closed Bug 1691286 Opened 3 years ago Closed 3 years ago

[Win] Print preview orientation is incorrect in some cases (e.g. when printing a browser-internal page)

Categories

(Core :: Print Preview, defect)

Unspecified
Windows
defect

Tracking

()

VERIFIED FIXED
87 Branch
Tracking Status
firefox-esr78 --- unaffected
firefox85 --- unaffected
firefox86 + verified
firefox87 --- verified

People

(Reporter: itiel_yn8, Assigned: dholbert)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

STR:

  1. Clean profile, Windows 10, latest Nightly
  2. Open about:preferences
  3. Ctrl+P
  4. Select Microsoft Print to PDF
  5. Switch orientation to landscape, click Print and cancel the dialog
  6. Again Ctrl+P
  7. The selected orientation is not what displayed on the preview pane. Toggling between the two doesn't change the outcome, but selecting and unselecting "Print backgrounds" do fix the orientations.
Flags: needinfo?(dholbert)
See Also: → 1690335

I can reproduce this bug in Windows 10, or something like this bug -- in some cases, the print dialog just defaults to selecting landscape (but rendering with portrait) as soon as I switch printers in the printer dropdown.

So far, I've only been able to see this with about: pages (e.g. about:preferences, about:support, about:buildconfig) - so it may be a bug with handling print settings that gets avoided or corrected-for when we send the settings across processes (which is what happens for regular web content, e.g. https://example.org)

Assignee: nobody → dholbert
Status: NEW → ASSIGNED

This was just a silly typo; I got the order of the ternary expression's options
backwards.

The mistake wasn't obvious from testing, because this function isn't always
invoked. In particular, it's not invoked if I print "https://example.org" in a
fresh profile, but it is invoked if I print "about:support" or other
browser-internal pages.

[Tracking Requested - why for this release]: This is a regression in 86 that we should avoid shipping if at all possible.

(Thanks itiel for the bug report & the clear STR!)

Flags: needinfo?(dholbert)
OS: Unspecified → Windows
Summary: Print preview orientation is incorrect in some cases → Print preview orientation is incorrect in some cases (e.g. when printing a browser-internal page)
Summary: Print preview orientation is incorrect in some cases (e.g. when printing a browser-internal page) → [Win] Print preview orientation is incorrect in some cases (e.g. when printing a browser-internal page)

Tracking for a potential uplift in out last 86 betas.

Pushed by dholbert@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/959589d501a2
Fix nsPrintSettingsWin::CopyFromNative to reliably encode the pages' orientation in the mOrientation field (fixing mismatched landscape/portrait rendering in some cases). r=jfkthame

Comment on attachment 9201708 [details]
Bug 1691286: Fix nsPrintSettingsWin::CopyFromNative to reliably encode the pages' orientation in the mOrientation field (fixing mismatched landscape/portrait rendering in some cases). r?jfkthame

Beta/Release Uplift Approval Request

  • User impact if declined: In some cases, the print dialog's settings may disagree with the actual rendering (e.g. "landscape" may be selected but the rendering shows portrait mode)
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: STR are in comment 0 and comment 1. Basically: in a fresh profile, try to print about:support or about:preferences, and see if the preview's rendering matches the highlighted "portrait" vs. "landscape" setting.
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): The patch just flips the order of outcomes in a conditional statement, to fix a typo. Automated test included, which fails without the patch & starts passing with the patch. Verified locally that the fix addresses the user-visible issues with the given STR, too.
  • String changes made/needed: None
Attachment #9201708 - Flags: approval-mozilla-beta?
Flags: qe-verify+

Itiel: if you wouldn't mind re-testing to verify that this is fixed in the next Nightly, that would be much appreciated!

Flags: needinfo?(itiel_yn8)
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 87 Branch
QA Whiteboard: [qa-triaged]

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

Itiel: if you wouldn't mind re-testing to verify that this is fixed in the next Nightly, that would be much appreciated!

Yup, seems to be fixed in Nightly now.

Flags: needinfo?(itiel_yn8)

Comment on attachment 9201708 [details]
Bug 1691286: Fix nsPrintSettingsWin::CopyFromNative to reliably encode the pages' orientation in the mOrientation field (fixing mismatched landscape/portrait rendering in some cases). r?jfkthame

Verified on Nightly, has tests and the patch is small, approved for 86 beta 8, thanks.

Attachment #9201708 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Status: RESOLVED → VERIFIED

Hello,

I have managed to reproduce this issue with 87.0a1(20210206213735) on Windows 10x64.

Confirming this issue as verified fixed using 86.0b8(20210209185733) and 87.0a1(20210209214921) on a Windows 10x64.

Flags: qe-verify+
Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: