mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 13:21:05 +00:00
Bug 1766640 - Remove nsIWebBrowserPrint.cancel(). r=emilio
It seems the new tab-modal printing code doesn't actually use this. Instead it relies on the window being closed (see cancelPrint() in toolkit/components/printing/content/print.js ). Differential Revision: https://phabricator.services.mozilla.com/D144821
This commit is contained in:
parent
7aeb663d4a
commit
6d2c0da09b
@ -3196,12 +3196,6 @@ nsDocumentViewer::GetCurrentPrintSettings(
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocumentViewer::Cancel() {
|
||||
NS_ENSURE_TRUE(mPrintJob, NS_ERROR_FAILURE);
|
||||
return mPrintJob->Cancel();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocumentViewer::ExitPrintPreview() {
|
||||
NS_ENSURE_TRUE(mPrintJob, NS_ERROR_FAILURE);
|
||||
|
@ -383,14 +383,6 @@ nsresult nsPrintJob::Initialize(nsIDocumentViewerPrint* aDocViewerPrint,
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------
|
||||
nsresult nsPrintJob::Cancel() {
|
||||
if (mPrt && mPrt->mPrintSettings) {
|
||||
return mPrt->mPrintSettings->SetIsCancelled(true);
|
||||
}
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------
|
||||
std::tuple<nsPageSequenceFrame*, int32_t>
|
||||
nsPrintJob::GetSeqFrameAndCountSheets() const {
|
||||
|
@ -97,6 +97,8 @@ interface nsIWebBrowserPrint : nsISupports
|
||||
* then the global PS will be used.
|
||||
* @param aWPListener - is updated during the print
|
||||
* @return void
|
||||
*
|
||||
* @note To cancel, close the window of the document that is being printed.
|
||||
*/
|
||||
[noscript] void print(in nsIPrintSettings aThePrintSettings,
|
||||
in nsIWebProgressListener aWPListener);
|
||||
@ -108,6 +110,8 @@ interface nsIWebBrowserPrint : nsISupports
|
||||
* then the global PS will be used.
|
||||
* @param aWPListener - is updated during the printpreview
|
||||
* @return void
|
||||
*
|
||||
* @note To cancel, close the print preview document's window.
|
||||
*/
|
||||
[noscript] void printPreview(in nsIPrintSettings aThePrintSettings,
|
||||
in nsIWebProgressListener aWPListener,
|
||||
@ -120,12 +124,6 @@ interface nsIWebBrowserPrint : nsISupports
|
||||
*/
|
||||
void printPreviewScrollToPage(in short aNavType, in long aPageNum);
|
||||
|
||||
/**
|
||||
* Cancels the current print
|
||||
* @return void
|
||||
*/
|
||||
void cancel();
|
||||
|
||||
/**
|
||||
* This exists PrintPreview mode and returns browser window to galley mode
|
||||
* @return void
|
||||
|
Loading…
Reference in New Issue
Block a user