Closed Bug 1663669 Opened 4 years ago Closed 4 years ago

[Intermittent] Print preview pages get stuck in Portrait mode (due to reusing settings objects across printers)

Categories

(Core :: Print Preview, defect, P1)

All
Windows
defect

Tracking

()

VERIFIED FIXED
82 Branch
Tracking Status
firefox-esr78 --- unaffected
firefox81 --- disabled
firefox82 --- verified
firefox83 --- verified

People

(Reporter: asoncutean, Assigned: sfoster)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: regression, Whiteboard: [print2020_v82] [old-ui-])

Attachments

(3 files, 2 obsolete files)

Attached image screencast issue.gif

Affected versions

  • 81.0b7
  • 82.0a1 (2020-09-08)

Affected platforms

  • Windows 10
  • Windows 7

Steps to reproduce

  1. Launch Firefox
  2. Make sure print.tab_modal.enabled is set on true
  3. Open a long page (eg. https://ro.wikipedia.org/wiki/Albert_Einstein)
  4. Set Destination to a connected printer in Portrait mode
  5. Change destination to Save to pdf
  6. Change Orientation to Landscape
  7. Change destination to a connected printer
  8. Change Orientation to Landscape

Expected result

  • The Print preview is displayed in Landscape mode

Actual result

  • The Print preview is displayed in Portrait mode

Regression range

Additional notes

  • The issue is intermittent with a higher reproducible rate on Windows 7

Suggested severity

  • S3 since it is intermittent

Following this code through the debugger after reproducing the bug it looks like the correct settings are being sent to the browser.frameLoader.printPreview() call.

I see bug 1653319 in there, perhaps this changed with the new frame loader API?

Anca, would you be able to narrow down this regression range a little? Since the settings appear to be correct bug 1653319 seems like it could be the culprit.

Component: Printing → Print Preview
Flags: needinfo?(anca.soncutean)
Product: Toolkit → Core

(In reply to Mark Striemer [:mstriemer] from comment #1)

Anca, would you be able to narrow down this regression range a little? Since the settings appear to be correct bug 1653319 seems like it could be the culprit.

Flags: needinfo?(anca.soncutean)

Thanks, that's helpful. It looks like bug 1653319 caused this then.

Is the "Landscape" button selected when it's stuck in portrate mode? It's unclear whether the UI and the preview document are both wrong, or just the preview document.

If after carrying out steps 1-8 above it is in the wrong mode, does clicking the "Landscape", then "Portrate" then "Landscape" buttons free it up, or does it remain stuck?

Do any errors show up in Tools -> Web Developer -> Browser Console?

Flags: needinfo?(anca.soncutean)
Regressed by: 1653319
Has Regression Range: --- → yes

(In reply to Jonathan Watt [:jwatt] from comment #3)

Is the "Landscape" button selected when it's stuck in portrate mode? It's unclear whether the UI and the preview document are both wrong, or just the preview document.
If after carrying out steps 1-8 above it is in the wrong mode, does clicking the "Landscape", then "Portrate" then "Landscape" buttons free it up, or does it remain stuck?

  • Only the content remains stuck in Portrait mode, the buttons are functional, toggling between them is possible, the Preparing preview is displayed for several second every time Portrait or Landscape is clicked, but the content in preview remains the same, displayed in Portrait mode regardless of witch button was last selected.
  • If the modal is closed with the printer set as Destination and Landscape set as Orientation and then reopened, the print preview content is opened directly in Landscape mode, and from there on print preview takes effect at every orientation change, until the user changes again the Destination to save to pdf and then back to printer when the issue occurs once again.

Do any errors show up in Tools -> Web Developer -> Browser Console?

  • No error message is displayed in console.
Flags: needinfo?(anca.soncutean)

I can reproduce, I'll see if I can track it down.

Assignee: nobody → bobowencode
Status: NEW → ASSIGNED
Priority: -- → P1
Whiteboard: [print2020_v81] [old-ui-] → [print2020_v82] [old-ui-]

This is to avoid the previous printer's settings object having the new printer's
name set on it.

Attachment #9174723 - Attachment is obsolete: true
Attached file WIP patch (obsolete) —
Severity: -- → S3
Attached file WIP patch

Picked some unrelated changes by accident.

Attachment #9175031 - Attachment is obsolete: true
See Also: → 1663445
Assignee: bobowencode → sfoster
  • Track user-initiated setting changes and attempt to re-apply them when switching printer
  • Keep a lookup of all the paper sizes we've seen, to allow retrieving the associated width/height when attempting to match a similarly size paper in the newly selected printer
  • Move the initialization of the settings for the PDF printer out of the view proxy and into resolvePropertiesForPrinter where the per-printer settings are created
See Also: → 1665031
Summary: [Intermittent] Print preview pages get stuck in Portrait mode → [Intermittent] Print preview pages get stuck in Portrait mode (due to reusing settings objects across printers)
See Also: → 1663503
Pushed by sfoster@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/694c9984be24
Ensure user setting changes are carried across a printer switch. r=mstriemer
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 82 Branch

Confirming this as verified fixed this using 83.0a1(20200922154306) and 82.0b2(20200922183749) on Windows 10x64.

Status: RESOLVED → VERIFIED
Regressions: 1667953
Regressions: 1669631
Regressions: 1682290
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: