Bug 1636678 - Drop unnecessary `if (kInitSaveOddEvenPages)` blocks. r=jwatt
authorHiroyuki Ikezoe <hikezoe.birchill@mozilla.com>
Tue, 19 May 2020 22:30:20 +0000
changeset 531371 ef5347cdad10318ca35ddc5b2c036cad40c6afed
parent 531370 edaed71901bd5af9a518c02575b205e276a62153
child 531372 8fdc6cd9df8ba4cdd98380b51cc49a2f8a9ef867
push id37438
push userabutkovits@mozilla.com
push dateThu, 21 May 2020 09:36:57 +0000
treeherdermozilla-central@2d00a1a6495c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjwatt
bugs1636678
milestone78.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1636678 - Drop unnecessary `if (kInitSaveOddEvenPages)` blocks. r=jwatt Differential Revision: https://phabricator.services.mozilla.com/D75898
widget/nsPrintSettingsService.cpp
--- a/widget/nsPrintSettingsService.cpp
+++ b/widget/nsPrintSettingsService.cpp
@@ -443,19 +443,16 @@ nsresult nsPrintSettingsService::ReadPre
     }
   }
 
   if (aFlags & nsIPrintSettings::kInitSaveOddEvenPages) {
     if (GETBOOLPREF(kPrintEvenPages, &b)) {
       aPS->SetPrintOptions(nsIPrintSettings::kPrintEvenPages, b);
       DUMP_BOOL(kReadStr, kPrintEvenPages, b);
     }
-  }
-
-  if (aFlags & nsIPrintSettings::kInitSaveOddEvenPages) {
     if (GETBOOLPREF(kPrintOddPages, &b)) {
       aPS->SetPrintOptions(nsIPrintSettings::kPrintOddPages, b);
       DUMP_BOOL(kReadStr, kPrintOddPages, b);
     }
   }
 
   if (aFlags & nsIPrintSettings::kInitSaveHeaderLeft) {
     if (GETSTRPREF(kPrintHeaderStrLeft, str)) {
@@ -710,19 +707,16 @@ nsresult nsPrintSettingsService::WritePr
   double dbl;
 
   if (aFlags & nsIPrintSettings::kInitSaveOddEvenPages) {
     if (NS_SUCCEEDED(
             aPS->GetPrintOptions(nsIPrintSettings::kPrintEvenPages, &b))) {
       DUMP_BOOL(kWriteStr, kPrintEvenPages, b);
       Preferences::SetBool(GetPrefName(kPrintEvenPages, aPrinterName), b);
     }
-  }
-
-  if (aFlags & nsIPrintSettings::kInitSaveOddEvenPages) {
     if (NS_SUCCEEDED(
             aPS->GetPrintOptions(nsIPrintSettings::kPrintOddPages, &b))) {
       DUMP_BOOL(kWriteStr, kPrintOddPages, b);
       Preferences::SetBool(GetPrefName(kPrintOddPages, aPrinterName), b);
     }
   }
 
   if (aFlags & nsIPrintSettings::kInitSaveHeaderLeft) {