Commit 1790ea26 authored by Jonathan Watt's avatar Jonathan Watt
Browse files

Bug 1769756 - Remove nsIWebBrowserPrint.currentPrintSettings. r=bobowen

parent 0d78c92d
Loading
Loading
Loading
Loading
+0 −12
Original line number Diff line number Diff line
@@ -3185,18 +3185,6 @@ nsDocumentViewer::GetDoingPrintPreview(bool* aDoingPrintPreview) {
  return NS_OK;
}

NS_IMETHODIMP
nsDocumentViewer::GetCurrentPrintSettings(
    nsIPrintSettings** aCurrentPrintSettings) {
  NS_ENSURE_ARG_POINTER(aCurrentPrintSettings);

  *aCurrentPrintSettings = nullptr;
  NS_ENSURE_TRUE(mPrintJob, NS_ERROR_FAILURE);

  *aCurrentPrintSettings = mPrintJob->GetCurrentPrintSettings().take();
  return NS_OK;
}

NS_IMETHODIMP
nsDocumentViewer::ExitPrintPreview() {
  NS_ENSURE_TRUE(mPrintJob, NS_ERROR_FAILURE);
+0 −10
Original line number Diff line number Diff line
@@ -571,16 +571,6 @@ int32_t nsPrintJob::GetPrintPreviewNumSheets() const {
  return numSheets;
}

already_AddRefed<nsIPrintSettings> nsPrintJob::GetCurrentPrintSettings() {
  if (mPrt) {
    return do_AddRef(mPrt->mPrintSettings);
  }
  if (mPrtPreview) {
    return do_AddRef(mPrtPreview->mPrintSettings);
  }
  return nullptr;
}

//-----------------------------------------------------------------
//-- Section: Pre-Reflow Methods
//-----------------------------------------------------------------
+0 −1
Original line number Diff line number Diff line
@@ -129,7 +129,6 @@ class nsPrintJob final : public nsIWebProgressListener,
  // due to pages having been skipped in a page range or combined into a single
  // sheet via pages-per-sheet.)
  int32_t GetPrintPreviewNumSheets() const;
  already_AddRefed<nsIPrintSettings> GetCurrentPrintSettings();

  // The setters here also update the DocViewer
  void SetIsPrinting(bool aIsPrinting);
+0 −9
Original line number Diff line number Diff line
@@ -46,15 +46,6 @@ interface nsIWebBrowserPrint : nsISupports
  const short PRINTPREVIEW_HOME         = 3;
  const short PRINTPREVIEW_END          = 4;

  /**
   * Returns a pointer to the PrintSettings object that
   * that was passed into either "print" or "print preview"
   *
   * This enables any consumers of the interface to have access
   * to the "current" PrintSetting at later points in the execution
   */
  readonly attribute nsIPrintSettings currentPrintSettings;

  /**
   * Returns whether it is in Print mode
   */