mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-26 12:20:56 +00:00
Bug 1537586 - Address build failure with --disable-printing r=bobowen,froydnj
Make nsIWebBrowserPrint included unconditionally for addressing nsIDocShell.rs build failure. Remove direct_call of PPrinting and PRemotePrintJob. Their ipdl are built unconditionally, but their derived classes are not built with --disable-printing. Differential Revision: https://phabricator.services.mozilla.com/D33391 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
2402708a44
commit
3d0c73c202
@ -51,9 +51,6 @@ DIRECT_CALL_OVERRIDES = {
|
||||
"PresentationRequestParent", "mozilla/dom/PresentationParent.h"
|
||||
),
|
||||
|
||||
("PPrinting", "child"): ("nsPrintingProxy", "nsPrintingProxy.h"),
|
||||
("PPrinting", "parent"): ("PrintingParent", "mozilla/embedding/printingui/PrintingParent.h"),
|
||||
|
||||
("PPSMContentDownloader", "child"): (
|
||||
"PSMContentDownloaderChild", "mozilla/psm/PSMContentListener.h"
|
||||
),
|
||||
@ -516,6 +513,12 @@ VIRTUAL_CALL_CLASSES = set([
|
||||
("PHandlerService", "parent"),
|
||||
("PPluginBackgroundDestroyer", "child"),
|
||||
("PPluginBackgroundDestroyer", "parent"),
|
||||
("PRemotePrintJob", "child"),
|
||||
("PRemotePrintJob", "parent"),
|
||||
# PRemotePrintJob, PPrinting, PPrintProgressDialog and PPrintSettingsDialog
|
||||
# need to be virtual for --disable-printing builds.
|
||||
("PPrinting", "child"),
|
||||
("PPrinting", "parent"),
|
||||
("PPrintProgressDialog", "child"),
|
||||
("PPrintProgressDialog", "parent"),
|
||||
("PPrintSettingsDialog", "child"),
|
||||
|
@ -612,10 +612,12 @@ nsDocumentViewer::~nsDocumentViewer() {
|
||||
mDocument->Destroy();
|
||||
}
|
||||
|
||||
#ifdef NS_PRINTING
|
||||
if (mPrintJob) {
|
||||
mPrintJob->Destroy();
|
||||
mPrintJob = nullptr;
|
||||
}
|
||||
#endif
|
||||
|
||||
MOZ_RELEASE_ASSERT(mDestroyBlockedCount == 0);
|
||||
NS_ASSERTION(!mPresShell && !mPresContext,
|
||||
|
@ -33,13 +33,13 @@ class RemotePrintJobChild final : public PRemotePrintJobChild,
|
||||
const int32_t& aStartPage, const int32_t& aEndPage);
|
||||
|
||||
mozilla::ipc::IPCResult RecvPrintInitializationResult(
|
||||
const nsresult& aRv, const FileDescriptor& aFd);
|
||||
const nsresult& aRv, const FileDescriptor& aFd) final;
|
||||
|
||||
void ProcessPage();
|
||||
|
||||
mozilla::ipc::IPCResult RecvPageProcessed(const FileDescriptor& aFd);
|
||||
mozilla::ipc::IPCResult RecvPageProcessed(const FileDescriptor& aFd) final;
|
||||
|
||||
mozilla::ipc::IPCResult RecvAbortPrint(const nsresult& aRv);
|
||||
mozilla::ipc::IPCResult RecvAbortPrint(const nsresult& aRv) final;
|
||||
|
||||
void SetPagePrintTimer(nsPagePrintTimer* aPagePrintTimer);
|
||||
|
||||
|
@ -34,23 +34,22 @@ class RemotePrintJobParent final : public PRemotePrintJobParent {
|
||||
mozilla::ipc::IPCResult RecvInitializePrint(const nsString& aDocumentTitle,
|
||||
const nsString& aPrintToFile,
|
||||
const int32_t& aStartPage,
|
||||
const int32_t& aEndPage);
|
||||
const int32_t& aEndPage) final;
|
||||
|
||||
mozilla::ipc::IPCResult RecvProcessPage();
|
||||
mozilla::ipc::IPCResult RecvProcessPage() final;
|
||||
|
||||
mozilla::ipc::IPCResult RecvFinalizePrint();
|
||||
mozilla::ipc::IPCResult RecvFinalizePrint() final;
|
||||
|
||||
mozilla::ipc::IPCResult RecvAbortPrint(const nsresult& aRv);
|
||||
mozilla::ipc::IPCResult RecvAbortPrint(const nsresult& aRv) final;
|
||||
|
||||
mozilla::ipc::IPCResult RecvStateChange(const long& aStateFlags,
|
||||
const nsresult& aStatus);
|
||||
const nsresult& aStatus) final;
|
||||
|
||||
mozilla::ipc::IPCResult RecvProgressChange(const long& aCurSelfProgress,
|
||||
const long& aMaxSelfProgress,
|
||||
const long& aCurTotalProgress,
|
||||
const long& aMaxTotalProgress);
|
||||
mozilla::ipc::IPCResult RecvProgressChange(
|
||||
const long& aCurSelfProgress, const long& aMaxSelfProgress,
|
||||
const long& aCurTotalProgress, const long& aMaxTotalProgress) final;
|
||||
|
||||
mozilla::ipc::IPCResult RecvStatusChange(const nsresult& aStatus);
|
||||
mozilla::ipc::IPCResult RecvStatusChange(const nsresult& aStatus) final;
|
||||
|
||||
/**
|
||||
* Register a progress listener to receive print progress updates.
|
||||
|
@ -18,10 +18,13 @@ XPIDL_SOURCES += [
|
||||
'nsIWebBrowserChromeFocus.idl',
|
||||
]
|
||||
|
||||
XPIDL_SOURCES += [
|
||||
'nsIWebBrowserPrint.idl',
|
||||
]
|
||||
|
||||
if CONFIG['NS_PRINTING']:
|
||||
XPIDL_SOURCES += [
|
||||
'nsIPrintingPromptService.idl',
|
||||
'nsIWebBrowserPrint.idl',
|
||||
]
|
||||
|
||||
XPIDL_MODULE = 'webBrowser_core'
|
||||
|
@ -30,28 +30,30 @@ class PrintingParent final : public PPrintingParent {
|
||||
|
||||
mozilla::ipc::IPCResult RecvShowProgress(
|
||||
PBrowserParent* parent, PPrintProgressDialogParent* printProgressDialog,
|
||||
PRemotePrintJobParent* remotePrintJob, const bool& isForPrinting);
|
||||
PRemotePrintJobParent* remotePrintJob, const bool& isForPrinting) final;
|
||||
mozilla::ipc::IPCResult RecvShowPrintDialog(
|
||||
PPrintSettingsDialogParent* aDialog, PBrowserParent* aParent,
|
||||
const PrintData& aData);
|
||||
const PrintData& aData) final;
|
||||
|
||||
mozilla::ipc::IPCResult RecvSavePrintSettings(
|
||||
const PrintData& data, const bool& usePrinterNamePrefix,
|
||||
const uint32_t& flags, nsresult* rv);
|
||||
const uint32_t& flags, nsresult* rv) final;
|
||||
|
||||
PPrintProgressDialogParent* AllocPPrintProgressDialogParent();
|
||||
PPrintProgressDialogParent* AllocPPrintProgressDialogParent() final;
|
||||
|
||||
bool DeallocPPrintProgressDialogParent(PPrintProgressDialogParent* aActor);
|
||||
bool DeallocPPrintProgressDialogParent(
|
||||
PPrintProgressDialogParent* aActor) final;
|
||||
|
||||
PPrintSettingsDialogParent* AllocPPrintSettingsDialogParent();
|
||||
PPrintSettingsDialogParent* AllocPPrintSettingsDialogParent() final;
|
||||
|
||||
bool DeallocPPrintSettingsDialogParent(PPrintSettingsDialogParent* aActor);
|
||||
bool DeallocPPrintSettingsDialogParent(
|
||||
PPrintSettingsDialogParent* aActor) final;
|
||||
|
||||
PRemotePrintJobParent* AllocPRemotePrintJobParent();
|
||||
PRemotePrintJobParent* AllocPRemotePrintJobParent() final;
|
||||
|
||||
bool DeallocPRemotePrintJobParent(PRemotePrintJobParent* aActor);
|
||||
bool DeallocPRemotePrintJobParent(PRemotePrintJobParent* aActor) final;
|
||||
|
||||
virtual void ActorDestroy(ActorDestroyReason aWhy) override;
|
||||
void ActorDestroy(ActorDestroyReason aWhy) final;
|
||||
|
||||
MOZ_IMPLICIT PrintingParent();
|
||||
|
||||
@ -73,7 +75,7 @@ class PrintingParent final : public PPrintingParent {
|
||||
layout::RemotePrintJobParent* aRemotePrintJob, PrintData* aPrintData);
|
||||
|
||||
private:
|
||||
virtual ~PrintingParent();
|
||||
~PrintingParent() final;
|
||||
|
||||
nsPIDOMWindowOuter* DOMWindowFromBrowserParent(PBrowserParent* parent);
|
||||
|
||||
|
@ -36,22 +36,24 @@ class nsPrintingProxy final : public nsIPrintingPromptService,
|
||||
uint32_t aFlags);
|
||||
|
||||
protected:
|
||||
PPrintProgressDialogChild* AllocPPrintProgressDialogChild();
|
||||
PPrintProgressDialogChild* AllocPPrintProgressDialogChild() final;
|
||||
|
||||
bool DeallocPPrintProgressDialogChild(PPrintProgressDialogChild* aActor);
|
||||
bool DeallocPPrintProgressDialogChild(
|
||||
PPrintProgressDialogChild* aActor) final;
|
||||
|
||||
PPrintSettingsDialogChild* AllocPPrintSettingsDialogChild();
|
||||
PPrintSettingsDialogChild* AllocPPrintSettingsDialogChild() final;
|
||||
|
||||
bool DeallocPPrintSettingsDialogChild(PPrintSettingsDialogChild* aActor);
|
||||
bool DeallocPPrintSettingsDialogChild(
|
||||
PPrintSettingsDialogChild* aActor) final;
|
||||
|
||||
PRemotePrintJobChild* AllocPRemotePrintJobChild();
|
||||
PRemotePrintJobChild* AllocPRemotePrintJobChild() final;
|
||||
|
||||
bool DeallocPRemotePrintJobChild(PRemotePrintJobChild* aActor);
|
||||
bool DeallocPRemotePrintJobChild(PRemotePrintJobChild* aActor) final;
|
||||
|
||||
private:
|
||||
nsPrintingProxy();
|
||||
|
||||
virtual ~nsPrintingProxy();
|
||||
~nsPrintingProxy() final;
|
||||
|
||||
nsresult Init();
|
||||
};
|
||||
|
@ -12,6 +12,7 @@
|
||||
|
||||
#include "nsGtkUtils.h"
|
||||
#include "nsIFileURL.h"
|
||||
#include "nsIGIOService.h"
|
||||
#include "nsIURI.h"
|
||||
#include "nsIWidget.h"
|
||||
#include "nsIFile.h"
|
||||
|
Loading…
x
Reference in New Issue
Block a user