Backed out 3 changesets (bug 1659856) for perma multiple perma failures. CLOSED TREE

Backed out changeset b61a789151df (bug 1659856)
Backed out changeset e0b318464ca0 (bug 1659856)
Backed out changeset f0090d86ffb5 (bug 1659856)
This commit is contained in:
Razvan Maries 2020-08-25 22:37:40 +03:00
Родитель b6c5d1394b
Коммит 7c244c8454
4 изменённых файлов: 0 добавлений и 115 удалений

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

@ -75,9 +75,6 @@ class nsPrintSettingsX : public nsPrintSettings {
NS_IMETHOD GetNumCopies(int32_t* aCopies) override;
NS_IMETHOD SetNumCopies(int32_t aCopies) override;
NS_IMETHOD GetDuplex(int32_t* aDuplex) override;
NS_IMETHOD SetDuplex(int32_t aDuplex) override;
NS_IMETHOD SetUnwriteableMarginTop(double aUnwriteableMarginTop) override;
NS_IMETHOD SetUnwriteableMarginLeft(double aUnwriteableMarginLeft) override;
NS_IMETHOD SetUnwriteableMarginBottom(

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

@ -530,75 +530,6 @@ nsPrintSettingsX::SetNumCopies(int32_t aCopies) {
NS_OBJC_END_TRY_ABORT_BLOCK_NSRESULT;
}
NS_IMETHODIMP
nsPrintSettingsX::GetDuplex(int32_t* aDuplex) {
NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NSRESULT;
if (XRE_IsParentProcess()) {
PMPrintSettings printSettings = GetPMPrintSettings();
PMDuplexMode duplexSetting;
if (PMGetDuplex(printSettings, &duplexSetting) == noErr) {
switch (duplexSetting) {
default:
MOZ_ASSERT_UNREACHABLE("Unknown Duplex value");
[[fallthrough]];
case kPMDuplexNone:
*aDuplex = kSimplex;
break;
case kPMDuplexNoTumble:
*aDuplex = kDuplexHorizontal;
break;
case kPMDuplexTumble:
*aDuplex = kDuplexVertical;
break;
}
} else {
return NS_ERROR_FAILURE;
}
} else {
nsPrintSettings::GetDuplex(aDuplex);
}
return NS_OK;
NS_OBJC_END_TRY_ABORT_BLOCK_NSRESULT;
}
NS_IMETHODIMP
nsPrintSettingsX::SetDuplex(int32_t aDuplex) {
NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NSRESULT;
if (XRE_IsParentProcess()) {
// Map nsIPrintSetting constants to macOS settings:
PMDuplexMode duplexSetting;
switch (aDuplex) {
default:
MOZ_ASSERT_UNREACHABLE("Unknown Duplex value");
[[fallthrough]];
case kSimplex:
duplexSetting = kPMDuplexNone;
break;
case kDuplexVertical:
duplexSetting = kPMDuplexNoTumble;
break;
case kDuplexHorizontal:
duplexSetting = kPMDuplexTumble;
break;
}
PMPrintSettings printSettings = GetPMPrintSettings();
if (PMSetDuplex(printSettings, duplexSetting) == noErr) {
[mPrintInfo updateFromPMPrintSettings];
} else {
return NS_ERROR_FAILURE;
}
} else {
nsPrintSettings::SetDuplex(aDuplex);
}
return NS_OK;
NS_OBJC_END_TRY_ABORT_BLOCK_NSRESULT;
}
NS_IMETHODIMP
nsPrintSettingsX::SetUnwriteableMarginTop(double aUnwriteableMarginTop) {
NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NSRESULT;

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

@ -95,13 +95,6 @@ interface nsIPrintSettings : nsISupports
const short kOutputFormatPS = 1;
const short kOutputFormatPDF = 2;
/**
* Simplex/Duplex printing options
*/
const short kSimplex = 0;
const short kDuplexHorizontal = 1;
const short kDuplexVertical = 2;
/**
* Set PrintOptions
*/

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

@ -371,23 +371,6 @@ void nsPrintSettingsWin::CopyFromNative(HDC aHdc, DEVMODEW* aDevMode) {
mNumCopies = aDevMode->dmCopies;
}
if (aDevMode->dmFields & DM_DUPLEX) {
switch (aDevMode->dmDuplex) {
default:
MOZ_ASSERT_UNREACHABLE("bad value for dmDuplex field");
[[fallthrough]];
case DMDUP_SIMPLEX:
mDuplex = kSimplex;
break;
case DMDUP_HORIZONTAL:
mDuplex = kDuplexHorizontal;
break;
case DMDUP_VERTICAL:
mDuplex = kDuplexVertical;
break;
}
}
// Since we do the scaling, grab their value and reset back to 100.
if (aDevMode->dmFields & DM_SCALE) {
double scale = double(aDevMode->dmScale) / 100.0f;
@ -494,25 +477,6 @@ void nsPrintSettingsWin::CopyToNative(DEVMODEW* aDevMode) {
// Setup Number of Copies
aDevMode->dmCopies = mNumCopies;
aDevMode->dmFields |= DM_COPIES;
// Setup Simplex/Duplex mode
switch (mDuplex) {
case kSimplex:
aDevMode->dmDuplex = DMDUP_SIMPLEX;
aDevMode->dmFields |= DM_DUPLEX;
break;
case kDuplexHorizontal:
aDevMode->dmDuplex = DMDUP_HORIZONTAL;
aDevMode->dmFields |= DM_DUPLEX;
break;
case kDuplexVertical:
aDevMode->dmDuplex = DMDUP_VERTICAL;
aDevMode->dmFields |= DM_DUPLEX;
break;
default:
MOZ_ASSERT_UNREACHABLE("bad value for duplex option");
break;
}
}
//-------------------------------------------