Bug 1661785 - Check for both CUPS_PRINT_COLOR_MODE_COLOR and CUPS_PRINT_COLOR_MODE_AUTO for CUPS color printing support. r=nordzilla, a=RyanVM
authorEmily McDonough <emcdonough@mozilla.com>
Fri, 28 Aug 2020 19:15:21 +0000
changeset 610673 b4cf43a3ba5bb54163cded85e316d8ad6991fd66
parent 610672 e0dd84c2c1b20abf5713a2f649d7ac57ff890f94
child 610674 0ec3a7607e34e9ddc74732367e1ac71fb66799f0
push id13706
push userryanvm@gmail.com
push dateMon, 31 Aug 2020 21:29:33 +0000
treeherdermozilla-beta@80a0372d4797 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnordzilla, RyanVM
bugs1661785, 1660658
milestone81.0
Bug 1661785 - Check for both CUPS_PRINT_COLOR_MODE_COLOR and CUPS_PRINT_COLOR_MODE_AUTO for CUPS color printing support. r=nordzilla, a=RyanVM This may fix bug 1660658. It's pretty harmless if it turns out to be redundant to make this check. Differential Revision: https://phabricator.services.mozilla.com/D88654
widget/nsPrinterCUPS.cpp
--- a/widget/nsPrinterCUPS.cpp
+++ b/widget/nsPrinterCUPS.cpp
@@ -105,17 +105,18 @@ const char* nsPrinterCUPS::LocalizeMedia
 #endif
 }
 
 bool nsPrinterCUPS::SupportsDuplex() const {
   return Supports(CUPS_SIDES, CUPS_SIDES_TWO_SIDED_PORTRAIT);
 }
 
 bool nsPrinterCUPS::SupportsColor() const {
-  return Supports(CUPS_PRINT_COLOR_MODE, CUPS_PRINT_COLOR_MODE_COLOR);
+  return Supports(CUPS_PRINT_COLOR_MODE, CUPS_PRINT_COLOR_MODE_COLOR) ||
+         Supports(CUPS_PRINT_COLOR_MODE, CUPS_PRINT_COLOR_MODE_AUTO);
 }
 
 bool nsPrinterCUPS::SupportsCollation() const {
   // We can't depend on cupsGetIntegerOption existing.
   const char* const value = mShim.cupsGetOption(
       "printer-type", mPrinter->num_options, mPrinter->options);
   if (!value) {
     return false;