Bug 1770199 - Remove the nsDeviceContextSpecWin::GetDPI override. r=bobowen

The default value for the pref print.default_dpi in StaticPrefList.yaml is
already 144. Having this override simply prevents that pref from working on
Windows.

Differential Revision: https://phabricator.services.mozilla.com/D146828
This commit is contained in:
Jonathan Watt 2022-05-19 16:52:29 +00:00
Родитель ac86b09b87
Коммит ffba683f2b
2 изменённых файлов: 0 добавлений и 11 удалений

Просмотреть файл

@ -334,15 +334,6 @@ already_AddRefed<PrintTarget> nsDeviceContextSpecWin::MakePrintTarget() {
return nullptr;
}
float nsDeviceContextSpecWin::GetDPI() {
if (mOutputFormat == nsIPrintSettings::kOutputFormatPDF || mPrintViaSkPDF) {
return nsIDeviceContextSpec::GetDPI();
}
// To match the previous printing code we need to return 144 when printing to
// a Windows surface.
return 144.0f;
}
float nsDeviceContextSpecWin::GetPrintingScale() {
MOZ_ASSERT(mPrintSettings);
if (mOutputFormat == nsIPrintSettings::kOutputFormatPDF || mPrintViaSkPDF) {

Просмотреть файл

@ -36,8 +36,6 @@ class nsDeviceContextSpecWin : public nsIDeviceContextSpec {
NS_IMETHOD Init(nsIWidget* aWidget, nsIPrintSettings* aPS,
bool aIsPrintPreview) override;
float GetDPI() final;
float GetPrintingScale() final;
gfxPoint GetPrintingTranslate() final;