Bug 1754111 part 3: Remove nsPrintJob.cpp's unused variable 'kPrintingPromptService', and a bunch of unused headers. r=emilio

This removal fixes the following non-fatal warning which (like some categories of warnings) only appears when you build in non-unified mode:
layout/printing/nsPrintJob.cpp:61:19: warning: unused variable 'kPrintingPromptService' [-Wunused-const-variable]

(Indeed, this variable was entirely unused.)

This patch also removes a bunch of surrounding #includes that looked
likely-unused to me as well. I did some spot-checks to be pretty-sure the
removed headers are all unused at this point, and (most importantly) I made
sure we still successfully build in non-unified mode.  This means that, if we
do actually depend on any of these removed includes, we're still getting them
indirectly via some other header, so these removals shouldn't really cause
trouble.

Depends on D138097

Differential Revision: https://phabricator.services.mozilla.com/D138098
This commit is contained in:
Daniel Holbert 2022-02-08 05:17:31 +00:00
parent e59129d620
commit 56596856cf

View File

@ -9,7 +9,6 @@
#include "nsDebug.h"
#include "nsDocShell.h"
#include "nsReadableUtils.h"
#include "nsCRT.h"
#include "nsQueryObject.h"
#include "mozilla/AsyncEventDispatcher.h"
@ -47,20 +46,12 @@
#include "nsIPrintSettings.h"
#include "nsIPrintSettingsService.h"
#include "nsIPrintSession.h"
#include "nsGfxCIID.h"
#include "nsGkAtoms.h"
#include "nsXPCOM.h"
static const char sPrintSettingsServiceContractID[] =
"@mozilla.org/gfx/printsettings-service;1";
#include "nsThreadUtils.h"
// Printing Prompts
#include "nsIPrintingPromptService.h"
static const char kPrintingPromptService[] =
"@mozilla.org/embedcomp/printingprompt-service;1";
// Printing Timer
#include "nsPagePrintTimer.h"
@ -68,25 +59,17 @@ static const char kPrintingPromptService[] =
#include "mozilla/dom/Document.h"
#include "mozilla/dom/DocumentInlines.h"
// Focus
// Misc
#include "gfxContext.h"
#include "mozilla/gfx/DrawEventRecorder.h"
#include "mozilla/layout/RemotePrintJobChild.h"
#include "nsISupportsUtils.h"
#include "nsIScriptContext.h"
#include "nsIDocumentObserver.h"
#include "nsComponentManagerUtils.h"
#include "nsContentCID.h"
#include "nsLayoutCID.h"
#include "nsContentUtils.h"
#include "nsLayoutUtils.h"
#include "mozilla/Preferences.h"
#include "mozilla/PresShell.h"
#include "Text.h"
#include "nsWidgetsCID.h"
#include "nsIDeviceContextSpec.h"
#include "nsDeviceContextSpecProxy.h"
#include "nsViewManager.h"
@ -95,7 +78,6 @@ static const char kPrintingPromptService[] =
#include "nsIInterfaceRequestor.h"
#include "nsIInterfaceRequestorUtils.h"
#include "nsIWebBrowserChrome.h"
#include "nsFrameManager.h"
#include "mozilla/ReflowInput.h"
#include "nsIContentViewer.h"
#include "nsIDocumentViewerPrint.h"
@ -105,9 +87,6 @@ static const char kPrintingPromptService[] =
#include "mozilla/Components.h"
#include "mozilla/dom/Element.h"
#include "mozilla/dom/HTMLFrameElement.h"
#include "nsContentList.h"
#include "xpcpublic.h"
#include "nsVariant.h"
#include "mozilla/ServoStyleSet.h"
using namespace mozilla;