mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 21:01:08 +00:00
Bug 1692845 - Restore read from global print settings for a few settings, including print_bgcolor and print_bgimages. r=bobowen
These were lost in bug 1667953, but I don't think print_bgimages / print_bgcolor should be printer-specific only. Differential Revision: https://phabricator.services.mozilla.com/D105465
This commit is contained in:
parent
3ae296b53c
commit
95e40970cd
@ -63,12 +63,7 @@ nsresult nsPrintSettingsServiceX::_CreatePrintSettings(nsIPrintSettings** _retva
|
||||
return rv;
|
||||
}
|
||||
|
||||
auto globalPrintSettings =
|
||||
nsIPrintSettings::kInitSaveShrinkToFit | nsIPrintSettings::kInitSaveHeaderLeft |
|
||||
nsIPrintSettings::kInitSaveHeaderCenter | nsIPrintSettings::kInitSaveHeaderRight |
|
||||
nsIPrintSettings::kInitSaveFooterLeft | nsIPrintSettings::kInitSaveFooterCenter |
|
||||
nsIPrintSettings::kInitSaveFooterRight | nsIPrintSettings::kInitSaveEdges |
|
||||
nsIPrintSettings::kInitSaveReversed | nsIPrintSettings::kInitSaveInColor;
|
||||
auto globalPrintSettings = nsIPrintSettings::kGlobalSettings;
|
||||
|
||||
// XXX Why is Mac special? Why are we copying global print settings here?
|
||||
// nsPrintSettingsService::InitPrintSettingsFromPrefs already gets the few
|
||||
|
@ -61,6 +61,14 @@ interface nsIPrintSettings : nsISupports
|
||||
|
||||
const unsigned long kInitSaveAll = 0xFFFFFFFF;
|
||||
|
||||
// These settings should be read from global prefs. Other settings should be
|
||||
// read only from printer-specific prefs.
|
||||
const unsigned long kGlobalSettings =
|
||||
kInitSaveHeaderLeft | kInitSaveHeaderCenter | kInitSaveHeaderRight |
|
||||
kInitSaveFooterLeft | kInitSaveFooterCenter | kInitSaveFooterRight |
|
||||
kInitSaveEdges | kInitSaveReversed | kInitSaveInColor |
|
||||
kInitSaveBGColors | kInitSaveBGImages | kInitSaveShrinkToFit;
|
||||
|
||||
/* Justification Enums */
|
||||
const long kJustLeft = 0;
|
||||
const long kJustCenter = 1;
|
||||
|
@ -840,20 +840,13 @@ nsPrintSettingsService::InitPrintSettingsFromPrefs(nsIPrintSettings* aPS,
|
||||
bool isInitialized;
|
||||
aPS->GetIsInitializedFromPrefs(&isInitialized);
|
||||
|
||||
if (isInitialized) return NS_OK;
|
||||
if (isInitialized) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
auto globalPrintSettings = aFlags;
|
||||
#ifndef MOZ_WIDGET_ANDROID
|
||||
globalPrintSettings &= nsIPrintSettings::kInitSaveShrinkToFit |
|
||||
nsIPrintSettings::kInitSaveHeaderLeft |
|
||||
nsIPrintSettings::kInitSaveHeaderCenter |
|
||||
nsIPrintSettings::kInitSaveHeaderRight |
|
||||
nsIPrintSettings::kInitSaveFooterLeft |
|
||||
nsIPrintSettings::kInitSaveFooterCenter |
|
||||
nsIPrintSettings::kInitSaveFooterRight |
|
||||
nsIPrintSettings::kInitSaveEdges |
|
||||
nsIPrintSettings::kInitSaveReversed |
|
||||
nsIPrintSettings::kInitSaveInColor;
|
||||
globalPrintSettings &= nsIPrintSettings::kGlobalSettings;
|
||||
#endif
|
||||
|
||||
nsAutoString prtName;
|
||||
|
Loading…
Reference in New Issue
Block a user