[Win] Print preview orientation is incorrect in some cases (e.g. when printing a browser-internal page)
Categories
(Core :: Print Preview, defect)
Tracking
()
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:
- Clean profile, Windows 10, latest Nightly
- Open about:preferences
- Ctrl+P
- Select Microsoft Print to PDF
- Switch orientation to landscape, click Print and cancel the dialog
- Again Ctrl+P
- 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.
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 1•3 years ago
•
|
||
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 | ||
Updated•3 years ago
|
Assignee | ||
Comment 2•3 years ago
|
||
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.
Assignee | ||
Comment 3•3 years ago
|
||
[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!)
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Updated•3 years ago
|
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
Assignee | ||
Comment 6•3 years ago
|
||
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
orabout: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
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 7•3 years ago
|
||
Itiel: if you wouldn't mind re-testing to verify that this is fixed in the next Nightly, that would be much appreciated!
Comment 8•3 years ago
|
||
bugherder |
Updated•3 years ago
|
(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.
Comment 10•3 years ago
|
||
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.
Assignee | ||
Updated•3 years ago
|
Comment 12•3 years ago
|
||
bugherder uplift |
Comment 13•3 years ago
|
||
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.
Updated•3 years ago
|
Updated•3 years ago
|
Description
•