Bug 1769756 - Remove nsIWebBrowserPrint.currentPrintSettings. r=bobowen

Differential Revision: https://phabricator.services.mozilla.com/D146569
This commit is contained in:
Jonathan Watt 2022-05-17 15:04:24 +00:00
Родитель 0d78c92de8
Коммит 1790ea2686
4 изменённых файлов: 0 добавлений и 32 удалений

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

@ -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);

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

@ -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
//-----------------------------------------------------------------

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

@ -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);

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

@ -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
*/