Closed Bug 1692845 Opened 4 years ago Closed 4 years ago

Custom print preferences are not read for Print dialog

Categories

(Core :: Printing: Setup, defect)

Firefox 85
defect

Tracking

()

VERIFIED FIXED
88 Branch
Tracking Status
firefox-esr78 --- unaffected
firefox86 --- wontfix
firefox87 --- verified
firefox88 --- verified

People

(Reporter: h.huenteler, Assigned: emilio)

References

(Regression)

Details

(Keywords: regression)

Attachments

(3 files)

Attached image ff85-not-set.png (deleted) —

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:85.0) Gecko/20100101 Firefox/85.0

Steps to reproduce:

I want to print a web-page and use earlier settings.
In this case they are

  • print.print_bgcolor
  • print.print_bgimages

Actual results:

i have attached an File with a hardcopy that describes it all.
When i leave Firefox, the settings are stored in the file prefs.js. Next i start Firefox and wants to print a webpage. For that i press CTRL-P and then i switch to the tab Options. The values from "about:config" are not transfered in the dialog.

Expected results:

The settings are read from the prefs.js-file and can be seen in "about:config".
The missing part is, that the checkboxes in the dialog are not set. That should change.

Note: i have had installed Firefox 82.0.2 for testing and there it is working. So this behavior comes with a later version ...

The Bugbug bot thinks this bug should belong to the 'Toolkit::Printing' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → Printing
Product: Firefox → Toolkit
Summary: print options not read → Custom print preferences are not read for Print dialog

I think Linux uses printer specific pref values now, I'm unsure if the global prefs should still be read though.

I feel like Emilio might've worked on that, not finding the bug though.

Component: Printing → Printing: Setup
Flags: needinfo?(emilio)
Product: Toolkit → Core

Yes, this was done in bug 968753, but we should read non-printer-specific prefs if the printer-specific prefs are not set.

Hardy, can you attach the contents of about:support to this bug report?

Also, does the "Modified print settings" section in there show something like print.yourprinter.print_bgcolor, etc? If so, removing those prefs should do.

Flags: needinfo?(emilio) → needinfo?(h.huenteler)

"Modified print settings"
Angepasste Druckeinstellungen
Name Wert print_printer D521
print.print_bgcolor true
print.print_bgimages true
print.print_duplex 0
print.print_evenpages true
print.print_margin_bottom 0.5
print.print_margin_left 0.5
print.print_margin_right 0.5
print.print_margin_top 0.5
print.print_oddpages true
print.print_orientation 0
print.print_page_delay 50
print.print_resolution 300
print.print_scaling 1,00
print.print_shrink_to_fit true
print.print_to_file false
print.print_to_filename /home/m500275/mozilla.pdf
print.print_unwriteable_margin_bottom 56
print.print_unwriteable_margin_left 25
print.print_unwriteable_margin_right 25
print.print_unwriteable_margin_top 25

Flags: needinfo?(h.huenteler)
Attached file about-support-as-xhtml.zip (deleted) —

attached the file with the about:support as xhtml-file packaged as zip

Ok, thanks, I could reproduce this. This was a regression from bug 1667953.

Assignee: nobody → emilio
Regressed by: 1667953
Has Regression Range: --- → yes
Status: UNCONFIRMED → NEW
Ever confirmed: true

These were lost in bug 1667953, but I don't think print_bgimages /
print_bgcolor should be printer-specific only.

Comment on attachment 9203716 [details]
Bug 1692845 - Restore read from global print settings for a few settings, including print_bgcolor and print_bgimages. r=jwatt

Beta/Release Uplift Approval Request

  • User impact if declined: Some print settings that historically had an effect no longer do.
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: Fresh profile -> about:config -> set print.print_bgcolors to true. Go to data:text/html,<body bgcolor=red>, ctrl+P, there should be red in the print preview.

(Will add an automated test for this though currently swamped with other things)

  • List of other uplifts needed: none
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): very simple patch adding two settings to the list of global prefs we read.
  • String changes made/needed: none
Attachment #9203716 - Flags: approval-mozilla-beta?
Flags: qe-verify+
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/9a2a18b1ec4c Restore read from global print settings for a few settings, including print_bgcolor and print_bgimages. r=bobowen
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 88 Branch

Thank you.

QA Whiteboard: [qa-triaged]

Comment on attachment 9203716 [details]
Bug 1692845 - Restore read from global print settings for a few settings, including print_bgcolor and print_bgimages. r=jwatt

Approved for 87.0b3.

Attachment #9203716 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

Tried verifying this on 88.0a1 (2021-02-24) under macOS 11.2.1. It seems that after setting the print.print_bgcolors to true, the print preview will still have a white page presented on "data:text/html,<body bgcolor=red>".
Here's an attachment with it.

Flags: needinfo?(emilio)

Sorry, typo in the pref name. Should be print.print_bgcolor.

Flags: needinfo?(emilio)

Tried again with "print.print_bgcolor" and the fix is working as expected. Tests were performed on Firefox 88.0a1 (2021-02-25) and on Firefox 87.0b3 (20210224220155) under macOS 11.2.1, Ubuntu 20.04 and Windows 10.
Thank you Emilio!

Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: