Commit ba3866a5 authored by Dmitrij Feller's avatar Dmitrij Feller
Browse files

Bug 370035 - Remove the aWidget parameter from nsIDeviceContextSpec::Init.r=spohl

parent 42dc9793
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -3405,8 +3405,7 @@ NS_IMETHODIMP nsDocumentViewer::SetPrintSettingsForSubdocument(

    RefPtr<nsDeviceContextSpecProxy> devspec =
        new nsDeviceContextSpecProxy(aRemotePrintJob);
    nsresult rv =
        devspec->Init(nullptr, aPrintSettings, /* aIsPrintPreview = */ true);
    nsresult rv = devspec->Init(aPrintSettings, /* aIsPrintPreview = */ true);
    NS_ENSURE_SUCCESS(rv, rv);

    mDeviceContext = new nsDeviceContext();
+1 −1
Original line number Diff line number Diff line
@@ -67,7 +67,7 @@ nsresult RemotePrintJobParent::InitializePrintDevice(
    return rv;
  }

  rv = deviceContextSpec->Init(nullptr, mPrintSettings, false);
  rv = deviceContextSpec->Init(mPrintSettings, false);
  if (NS_WARN_IF(NS_FAILED(rv))) {
    return rv;
  }
+1 −1
Original line number Diff line number Diff line
@@ -456,7 +456,7 @@ nsresult nsPrintJob::DoCommonPrint(bool aIsPrintPreview,
    Telemetry::ScalarAdd(Telemetry::ScalarID::PRINTING_SILENT_PRINT, 1);
  }

  MOZ_TRY(devspec->Init(nullptr, mPrintSettings, mIsCreatingPrintPreview));
  MOZ_TRY(devspec->Init(mPrintSettings, mIsCreatingPrintPreview));

  printData->mPrintDC = new nsDeviceContext();
  MOZ_TRY(printData->mPrintDC->InitForPrinting(devspec));
+1 −2
Original line number Diff line number Diff line
@@ -58,8 +58,7 @@ already_AddRefed<PrintTarget> nsDeviceContextSpecAndroid::MakePrintTarget() {
}

NS_IMETHODIMP
nsDeviceContextSpecAndroid::Init(nsIWidget* aWidget, nsIPrintSettings* aPS,
                                 bool aIsPrintPreview) {
nsDeviceContextSpecAndroid::Init(nsIPrintSettings* aPS, bool aIsPrintPreview) {
  mPrintSettings = aPS;
  return NS_OK;
}
+1 −2
Original line number Diff line number Diff line
@@ -17,8 +17,7 @@ class nsDeviceContextSpecAndroid final : public nsIDeviceContextSpec {

  already_AddRefed<PrintTarget> MakePrintTarget() final;

  NS_IMETHOD Init(nsIWidget* aWidget, nsIPrintSettings* aPS,
                  bool aIsPrintPreview) override;
  NS_IMETHOD Init(nsIPrintSettings* aPS, bool aIsPrintPreview) override;
  NS_IMETHOD BeginDocument(const nsAString& aTitle,
                           const nsAString& aPrintToFileName,
                           int32_t aStartPage, int32_t aEndPage) override;
Loading