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
--- 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;