Last Comment Bug 652914 - Preferred page background color is printed, even when "Print Background Colors" is unchecked
: Preferred page background color is printed, even when "Print Background Color...
Status: RESOLVED FIXED
: regression
Product: Core
Classification: Components
Component: Printing: Output (show other bugs)
: Trunk
: All All
: -- major with 3 votes (vote)
: mozilla9
Assigned To: Timothy Nikkel (:tnikkel)
:
: Jet Villegas (:jet)
Mentors:
http://getsatisfaction.com/mozilla_me...
: 647763 674211 675274 (view as bug list)
Depends on:
Blocks: 584193 674211
  Show dependency treegraph
 
Reported: 2011-04-26 12:13 PDT by Daniel Holbert [:dholbert]
Modified: 2011-10-31 04:59 PDT (History)
18 users (show)
vseerror: in‑testsuite?
vseerror: in‑litmus?
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
-


Attachments
patch (6.30 KB, patch)
2011-09-01 20:58 PDT, Timothy Nikkel (:tnikkel)
roc: review+
Details | Diff | Splinter Review
patch (3.41 KB, patch)
2011-09-07 09:04 PDT, Timothy Nikkel (:tnikkel)
roc: review+
Details | Diff | Splinter Review

Description Daniel Holbert [:dholbert] 2011-04-26 12:13:22 PDT
STEPS TO REPRODUCE:
 1. In Firefox preferences, go to "Content" tab, and click the "colors" button.
 2. Pick some non-white background color, e.g. red
 3. Visit http://ftp.mozilla.org/pub/mozilla.org/README and do File| Print
 4. Ensure that "print background colors" is unchecked in print dialog. (on Linux, it's under the "Options" tab in that dialog.
 5. Go ahead with the print.

EXPECTED RESULTS: no background color on the printed output.
ACTUAL RESULTS:  printed output has the background color I specified in step 2

Mozilla/5.0 (X11; Linux x86_64; rv:6.0a1) Gecko/20110426 Firefox/6.0a1

This was originally reported in bug 498787 comment 7 - 9.
Comment 1 Alice0775 White 2011-04-26 13:12:57 PDT
Works:
http://hg.mozilla.org/mozilla-central/rev/01fa971e62ee
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b5pre) Gecko/20100827 Firefox/4.0b5pre ID:20100827190212
Fails:
http://hg.mozilla.org/mozilla-central/rev/0886ad6e6aaa
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b5pre) Gecko/20100827 Firefox/4.0b5pre ID:20100827190555
Pushlog:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=01fa971e62ee&tochange=0886ad6e6aaa
Triggered by;
0886ad6e6aaa	Robert O'Callahan — Bug 584193. Allow print preview to work without its own widget. r=smaug a=blocking beta5
Comment 2 Daniel Holbert [:dholbert] 2011-04-26 13:22:37 PDT
Alice0775, you're a rockstar. :)

Just to be clear -- did you verify that this was triggered by 0886ad6e6aaa and not another cset from that push?  e.g. this one also looks suspicious:
be60f89d06ba	Robert O'Callahan — Bug 574621. Ensure that the prescontext
DefaultBackgroundColor is painted on the background of root content documents.
Comment 3 Alice0775 White 2011-04-26 14:08:13 PDT
                                Print Background (colors & images)
                                unchecked              checked
m-c hourly build 0886ad6e6aaa : user background color  user&site background color 
local build from 7804b5cf4313 : no background color    no background color
local build from be60f89d06ba : no background color    no background color

So, I guess c-set 0886ad6e6aaa triggered the issue.
Comment 4 Yeti 2011-07-13 00:14:23 PDT
I'd just like to add it still happens in Seamonkey latest nightly (Mozilla/5.0 (Windows NT 5.1; rv:7.0a2) Gecko/20110712 Firefox/7.0a2 SeaMonkey/2.4a2).
Prints out color set up as "window background" in Win control panel when
printing any text-only e-mail message (I didn't set any custom color in the SM prefs). Reproducible always. Very annoying.
Started happening since upgrade to Seamonkey 2.1 IIRC.
Comment 5 Christopher Blizzard (:blizzard) 2011-07-14 14:29:42 PDT
Tracking for Firefox 7.
Comment 6 Bernard Jurgiel 2011-07-28 07:34:40 PDT
Using Thunderbird 5.0, OS is Windows Vista Home Premium.

email background color is set to a "non-white" selection (i.e. cyan).

In page Setup, under Format & Options tab - under Options, the "Print Background (colors & images)" is unchecked.  However, when email is printed, the background color (i.e. cyan) is printed.  Tried checking the box, and printing; the background color still prints.

Note: the Background color was set in Tools - Options - Display.
Comment 7 Wayne Mery (:wsmwk, NI for questions) 2011-07-29 05:29:22 PDT
this will be more than an annoyance for corporate types (my context=emails)
=> major
Comment 8 Wayne Mery (:wsmwk, NI for questions) 2011-07-29 05:30:19 PDT
*** Bug 647763 has been marked as a duplicate of this bug. ***
Comment 9 Wayne Mery (:wsmwk, NI for questions) 2011-07-29 05:57:46 PDT
it's rather sad that this regressed (if bug 584193 is the regressor) almost a year ago, and it was never caught.
Comment 10 tom 2011-07-29 11:53:08 PDT
Thanks for working on this. The cost of having a dark background print on every print page is devastating!
Comment 11 Philip Chee 2011-07-31 08:16:12 PDT
*** Bug 675274 has been marked as a duplicate of this bug. ***
Comment 12 Asa Dotzler [:asa] 2011-08-11 15:00:55 PDT
not going to track this for 7.
Comment 13 Álvaro G. Vicario 2011-08-20 09:24:22 PDT
Not sure if it's relevant but I've just found out that the background-color CSS property is not being fully ignored (tested in Firefox/6.0).

Bug doesn't happen (background colour is *not* printed) if the site uses:

    - background-color: white;
    - background-color: red;

The bug is triggered (default system colour is used) if:

    - background-color: transparent;
    - background-color is not set
Comment 14 Bernard Jurgiel 2011-08-31 17:46:22 PDT
Still a problem with Thunderbird 6.0.1.

If the email background is not white then the background color prints no matter what print preference is set.
Comment 15 Timothy Nikkel (:tnikkel) 2011-09-01 20:58:07 PDT
Created attachment 557763 [details] [diff] [review]
patch

In nsCSSRendering::DetermineBackgroundColor when we are asked not to draw background colors we still draw white and not the default background color. This patch basically extends that logic to the special handling of the canvas background color we have in the presshell.
Comment 16 Timothy Nikkel (:tnikkel) 2011-09-06 13:20:45 PDT
Pushed to inbound
http://hg.mozilla.org/integration/mozilla-inbound/rev/a38f82d29d97
but it bounched because of reftest failures:
http://hg.mozilla.org/integration/mozilla-inbound/rev/dc30ee4aca21
Comment 17 Timothy Nikkel (:tnikkel) 2011-09-07 09:04:05 PDT
Created attachment 558839 [details] [diff] [review]
patch

The previous patch was wrong because DetermineBackgroundColor sets aDrawBackgroundColor to false even if we are not printing or are drawing background colors and the background color is completely transparent. So the logic of the previous patch was completely wrong.
Comment 18 Timothy Nikkel (:tnikkel) 2011-09-07 21:44:59 PDT
http://hg.mozilla.org/integration/mozilla-inbound/rev/9b35a07f21b1
Comment 20 Timothy Nikkel (:tnikkel) 2011-09-08 10:42:55 PDT
*** Bug 674211 has been marked as a duplicate of this bug. ***
Comment 21 Paul Mason 2011-09-08 18:26:30 PDT
Well it looks like someone bug-it-up again in 6.0.2 as theckgound colour is now printing in an enmail as I type this
Comment 22 Paul Mason 2011-09-08 18:38:02 PDT
So it's back to a white background and more bloody eyestrain and headaches.

IF it is not broken why fix it? 

In this case it was fixed but it is broken again.

This is getting dam anoying and looks as if some one is trying to force us to have printed background colours regardless as per his/her request some time ago
Comment 23 Timothy Nikkel (:tnikkel) 2011-09-08 20:15:57 PDT
The fix isn't in 6.0.2. You'd need to be using a nightly build dated 2011-09-09 or newer (no such build exists at this time).
Comment 24 Paul Mason 2011-09-09 05:33:37 PDT
(In reply to Timothy Nikkel (:tn) from comment #23)
> The fix isn't in 6.0.2. You'd need to be using a nightly build dated
> 2011-09-09 or newer (no such build exists at this time).

Well this is what it says in The "HELP ~ About Thunderbird"  

Thunberbird
6.0.2
Thunderbird is up to date
You are currently on the release update channel

etc.

So if no build exist why is thunderbird telling me this 

'not on nightly builds

Troble shooting information sent to bugzilla-daemon@mozilla.org as well as a screen shot of the "HELP ~ About Thunderbird" as well
Comment 25 Paul Mason 2011-09-09 05:37:57 PDT

  Application Basics

    Name: Thunderbird
    Version: 6.0.2
    User Agent: Mozilla/5.0 (Windows NT 6.1; rv:6.0.2) Gecko/20110902 Thunderbird/6.0.2
    Profile Directory: Open Containing Folder

              (Local drive)
    Application Build ID: 20110902221921
    Enabled Plugins: about:plugins
    Build Configuration: about:buildconfig

  Mail and News Accounts
    account1:
      INCOMING: account1, , (pop3) pop.mail.yahoo.com:110, plain, passwordCleartext
      OUTGOING: mail.btinternet.com:25, plain, passwordCleartext, true

    account2:
      INCOMING: account2, , (none) Local Folders, plain, passwordCleartext

    account3:
      INCOMING: account3, , (rss) Feeds, plain, passwordCleartext

    account5:
      INCOMING: account5, , (pop3) pop.mail.yahoo.com:110, plain, passwordCleartext
      OUTGOING: mail.btinternet.com:25, plain, passwordCleartext, true

  Extensions
    British English Dictionary, 1.19.1, true, en-GB@dictionaries.addons.mozilla.org
    Priority Switcher, 0.6.13, true, {0D2172E4-C5AE-465A-B80D-53A840275B5E}

  Modified Preferences

    Name: Value

      extensions.lastAppVersion: 6.0.2
      font.name.monospace.el: Consolas
      font.name.monospace.tr: Consolas
      font.name.monospace.x-baltic: Consolas
      font.name.monospace.x-central-euro: Consolas
      font.name.monospace.x-cyrillic: Consolas
      font.name.monospace.x-unicode: Consolas
      font.name.monospace.x-western: Cambria
      font.name.sans-serif.el: Calibri
      font.name.sans-serif.tr: Calibri
      font.name.sans-serif.x-baltic: Calibri
      font.name.sans-serif.x-central-euro: Calibri
      font.name.sans-serif.x-cyrillic: Calibri
      font.name.sans-serif.x-unicode: Calibri
      font.name.sans-serif.x-western: Times New Roman
      font.name.serif.el: Cambria
      font.name.serif.tr: Cambria
      font.name.serif.x-baltic: Cambria
      font.name.serif.x-central-euro: Cambria
      font.name.serif.x-cyrillic: Cambria
      font.name.serif.x-unicode: Cambria
      font.name.serif.x-western: Courier New
      font.size.fixed.el: 14
      font.size.fixed.tr: 14
      font.size.fixed.x-baltic: 14
      font.size.fixed.x-central-euro: 14
      font.size.fixed.x-cyrillic: 14
      font.size.fixed.x-unicode: 14
      font.size.fixed.x-western: 16
      font.size.variable.el: 17
      font.size.variable.tr: 17
      font.size.variable.x-baltic: 17
      font.size.variable.x-central-euro: 17
      font.size.variable.x-cyrillic: 17
      font.size.variable.x-unicode: 17
      mail.openMessageBehavior.version: 1
      mail.winsearch.firstRunDone: true
      network.cookie.lifetimePolicy: 2
      network.cookie.prefsMigrated: true
      places.database.lastMaintenance: 1315482482
      places.history.expiration.transient_current_max_pages: 42219
      print.print_printer: Adobe PDF
      print.printer_Adobe_PDF.print_bgcolor: false
      print.printer_Adobe_PDF.print_bgimages: false
      print.printer_Adobe_PDF.print_command:
      print.printer_Adobe_PDF.print_downloadfonts: false
      print.printer_Adobe_PDF.print_edge_bottom: 0
      print.printer_Adobe_PDF.print_edge_left: 0
      print.printer_Adobe_PDF.print_edge_right: 0
      print.printer_Adobe_PDF.print_edge_top: 0
      print.printer_Adobe_PDF.print_evenpages: true
      print.printer_Adobe_PDF.print_footercenter:
      print.printer_Adobe_PDF.print_footerleft: &PT
      print.printer_Adobe_PDF.print_footerright: &D
      print.printer_Adobe_PDF.print_headercenter:
      print.printer_Adobe_PDF.print_headerleft: &T
      print.printer_Adobe_PDF.print_headerright: &U
      print.printer_Adobe_PDF.print_in_color: true
      print.printer_Adobe_PDF.print_margin_bottom: 0.5
      print.printer_Adobe_PDF.print_margin_left: 0.5
      print.printer_Adobe_PDF.print_margin_right: 0.5
      print.printer_Adobe_PDF.print_margin_top: 0.5
      print.printer_Adobe_PDF.print_oddpages: true
      print.printer_Adobe_PDF.print_orientation: 0
      print.printer_Adobe_PDF.print_page_delay: 50
      print.printer_Adobe_PDF.print_paper_data: 9
      print.printer_Adobe_PDF.print_paper_height: 11.00
      print.printer_Adobe_PDF.print_paper_size_type: 0
      print.printer_Adobe_PDF.print_paper_size_unit: 1
      print.printer_Adobe_PDF.print_paper_width: 8.50
      print.printer_Adobe_PDF.print_reversed: false
      print.printer_Adobe_PDF.print_scaling: 1.00
      print.printer_Adobe_PDF.print_shrink_to_fit: false
      print.printer_Adobe_PDF.print_to_file: false
      print.printer_Adobe_PDF.print_unwriteable_margin_bottom: 0
      print.printer_Adobe_PDF.print_unwriteable_margin_left: 0
      print.printer_Adobe_PDF.print_unwriteable_margin_right: 0
      print.printer_Adobe_PDF.print_unwriteable_margin_top: 0
      print.printer_MINOLTA-QMS_PagePro_1100_(PCL).print_bgcolor: false
      print.printer_MINOLTA-QMS_PagePro_1100_(PCL).print_bgimages: false
      print.printer_MINOLTA-QMS_PagePro_1100_(PCL).print_command:
      print.printer_MINOLTA-QMS_PagePro_1100_(PCL).print_downloadfonts: false
      print.printer_MINOLTA-QMS_PagePro_1100_(PCL).print_edge_bottom: 0
      print.printer_MINOLTA-QMS_PagePro_1100_(PCL).print_edge_left: 0
      print.printer_MINOLTA-QMS_PagePro_1100_(PCL).print_edge_right: 0
      print.printer_MINOLTA-QMS_PagePro_1100_(PCL).print_edge_top: 0
      print.printer_MINOLTA-QMS_PagePro_1100_(PCL).print_evenpages: true
      print.printer_MINOLTA-QMS_PagePro_1100_(PCL).print_footercenter:
      print.printer_MINOLTA-QMS_PagePro_1100_(PCL).print_footerleft: &PT
      print.printer_MINOLTA-QMS_PagePro_1100_(PCL).print_footerright: &D
      print.printer_MINOLTA-QMS_PagePro_1100_(PCL).print_headercenter:
      print.printer_MINOLTA-QMS_PagePro_1100_(PCL).print_headerleft: &T
      print.printer_MINOLTA-QMS_PagePro_1100_(PCL).print_headerright: &U
      print.printer_MINOLTA-QMS_PagePro_1100_(PCL).print_in_color: true
      print.printer_MINOLTA-QMS_PagePro_1100_(PCL).print_margin_bottom: 0.5
      print.printer_MINOLTA-QMS_PagePro_1100_(PCL).print_margin_left: 0.5
      print.printer_MINOLTA-QMS_PagePro_1100_(PCL).print_margin_right: 0.5
      print.printer_MINOLTA-QMS_PagePro_1100_(PCL).print_margin_top: 0.5
      print.printer_MINOLTA-QMS_PagePro_1100_(PCL).print_oddpages: true
      print.printer_MINOLTA-QMS_PagePro_1100_(PCL).print_orientation: 0
      print.printer_MINOLTA-QMS_PagePro_1100_(PCL).print_pagedelay: 500
      print.printer_MINOLTA-QMS_PagePro_1100_(PCL).print_paper_data: 9
      print.printer_MINOLTA-QMS_PagePro_1100_(PCL).print_paper_height: 11.00
      print.printer_MINOLTA-QMS_PagePro_1100_(PCL).print_paper_size_type: 0
      print.printer_MINOLTA-QMS_PagePro_1100_(PCL).print_paper_size_unit: 1
      print.printer_MINOLTA-QMS_PagePro_1100_(PCL).print_paper_width: 8.50
      print.printer_MINOLTA-QMS_PagePro_1100_(PCL).print_reversed: false
      print.printer_MINOLTA-QMS_PagePro_1100_(PCL).print_scaling: 1.00
      print.printer_MINOLTA-QMS_PagePro_1100_(PCL).print_shrink_to_fit: false
      print.printer_MINOLTA-QMS_PagePro_1100_(PCL).print_to_file: false
      print.printer_MINOLTA-QMS_PagePro_1100_(PCL).print_unwriteable_margin_bottom: 0
      print.printer_MINOLTA-QMS_PagePro_1100_(PCL).print_unwriteable_margin_left: 0
      print.printer_MINOLTA-QMS_PagePro_1100_(PCL).print_unwriteable_margin_right: 0
      print.printer_MINOLTA-QMS_PagePro_1100_(PCL).print_unwriteable_margin_top: 0
      security.disable_button.openCertManager: false
      security.disable_button.openDeviceManager: false
      security.OCSP.disable_button.managecrl: false

  Graphics

    Adapter Description: Mobile Intel(R) 4 Series Express Chipset Family
    Vendor ID: 8086
    Device ID: 2a42
    Adapter RAM: Unknown
    Adapter Drivers: igdumdx32 igd10umd32
    Driver Version: 8.15.10.2302
    Driver Date: 2-11-2011
    Direct2D Enabled: true
    DirectWrite Enabled: true (6.1.7601.17563)
    WebGL Renderer: Google Inc. -- ANGLE -- OpenGL ES 2.0 (ANGLE 0.0.0.686)
    GPU Accelerated Windows: 3/3 Direct3D 10

  For some reason the Troubleshooting Information is shown the wrong printer a defaultas well the default printer should be Epson D92
Comment 26 Wayne Mery (:wsmwk, NI for questions) 2011-09-09 05:56:57 PDT
(In reply to Paul Mason from comment #24)
> (In reply to Timothy Nikkel (:tn) from comment #23)
> > The fix isn't in 6.0.2. You'd need to be using a nightly build dated
> > 2011-09-09 or newer (no such build exists at this time).
> 
> Well this is what it says in The "HELP ~ About Thunderbird"  
> 
> Thunberbird
> 6.0.2
> Thunderbird is up to date
> You are currently on the release update channel

Paul, You've been around long enough in bugzilla that you should know that patches don't appear immediately in release builds - it may take some weeks or months for this fix to appear in a release. Please stop spamming this bug.

As for the printer and troubleshooting info, please file a new bug
Comment 27 Paul Mason 2011-09-09 06:43:23 PDT
(In reply to Wayne Mery (:wsmwk) from comment #26)
> (In reply to Paul Mason from comment #24)
> (In reply to Timothy Nikkel
> (:tn) from comment #23)
> > The fix isn't in 6.0.2. You'd need to be using a
> nightly build dated
> > 2011-09-09 or newer (no such build exists at this
> time).
> 
> Well this is what it says in The "HELP ~ About Thunderbird"  
> 
> > Thunberbird
> 6.0.2
> Thunderbird is up to date
> You are currently on the
> release update channel

Paul, You've been around long enough in bugzilla
> that you should know that patches don't appear immediately in release builds
> - it may take some weeks or months for this fix to appear in a release.
> Please stop spamming this bug.

As for the printer and troubleshooting info,
> please file a new bug

Ah BUT this was fixed in 6.0.1 so who buged it up AGAIN in 6.0.2
Comment 28 John Liebson 2011-09-28 13:57:04 PDT
This bug is not fixed: The problem remains with Thunderbird 7.0, running under Windows Home Premium.
Comment 29 Daniel Holbert [:dholbert] 2011-09-28 14:10:05 PDT
This is fixed in Gecko 9.0 (see the "Target Milestone" field), which means the first fixed releases will be Firefox 9.0 and Thunderbird 9.0.
Comment 30 John Liebson 2011-09-28 14:27:39 PDT
In reply to Comment 29, thank you very much for clearing up my confusion: I did not realize that the, while the thread seemed to refer only to Firefox, in also covers TB. I shall modify my last comment in MozillaZine, adding your comment, to indicate that, despite my confusion, the problem is known not to have been solved as of yet, but shall be in the future.
Comment 31 Paul Mason 2011-09-29 03:37:34 PDT
(In reply to John Liebson from comment #28)
> This bug is not fixed: The problem remains with Thunderbird 7.0, running
> under Windows Home Premium.

(In reply to Daniel Holbert [:dholbert] from comment #29)
> This is fixed in Gecko 9.0 (see the "Target Milestone" field), which means
> the first fixed releases will be Firefox 9.0 and Thunderbird 9.0.

And if this is not fixed by Thunderbird 9.0 do we all go back to good old windows mail or wait it out till thunberbird 2000
Comment 32 Paul Mason 2011-09-29 03:39:03 PDT
(In reply to John Liebson from comment #28)
> This bug is not fixed: The problem remains with Thunderbird 7.0, running
> under Windows Home Premium.

(In reply to Daniel Holbert [:dholbert] from comment #29)
> This is fixed in Gecko 9.0 (see the "Target Milestone" field), which means
> the first fixed releases will be Firefox 9.0 and Thunderbird 9.0.

And if this is not fixed by Thunderbird 9.0 do we all go back to good old windows mail or wait it out till thunberbird 2000
Comment 33 bugzilla 2011-10-07 00:20:17 PDT
As expected, this bug also occurs in the current Seamonkey 2.4.

Seamonkey 2.5 will be using Gecko 7 (correct me if I'm wrong), Gecko 9 seems far away. Which will be the first Seamonkey to use Gecko 9?
https://developer.mozilla.org/en/Gecko is a bit outdated.
Comment 34 K Chayka 2011-10-31 04:59:00 PDT
(In reply to bugzilla from comment #33)
> Seamonkey 2.5 will be using Gecko 7 (correct me if I'm wrong), Gecko 9 seems
> far away. Which will be the first Seamonkey to use Gecko 9?

I don't know about Gecko 9, but the bug looks fixed in recent Seamonkey nightly builds. I'm currently using SeaMonkey/2.7a1

Note You need to log in before you can comment on or make changes to this bug.