Bug 1156632 - Remove unused forward class declarations - patch 3 - dom/{events,xbl,xslt,xul} and others, r=ehsan
authorAndrea Marchesini <amarchesini@mozilla.com>
Wed, 22 Apr 2015 08:29:18 +0200
changeset 240464 7617f4ffb3145987ec717a29789ff5636889fbf8
parent 240463 29bf41172acdd5a120955f63983a6625dff84f5a
child 240465 60a2001adf9acc476ecb1ceb5652618c70e56f50
push id28636
push userkwierso@gmail.com
push dateThu, 23 Apr 2015 00:16:12 +0000
treeherdermozilla-central@a5af73b32ac8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersehsan
bugs1156632
milestone40.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1156632 - Remove unused forward class declarations - patch 3 - dom/{events,xbl,xslt,xul} and others, r=ehsan
dom/bindings/test/TestCImplementedInterface.h
dom/bluetooth/bluedroid/BluetoothDaemonSocketInterface.h
dom/bluetooth/bluedroid/hfp/BluetoothHfpManager.h
dom/bluetooth/bluetooth1/BluetoothDevice.h
dom/bluetooth/bluetooth1/BluetoothPropertyContainer.h
dom/bluetooth/bluetooth1/BluetoothService.h
dom/bluetooth/bluetooth2/BluetoothDevice.h
dom/bluetooth/bluetooth2/BluetoothDiscoveryHandle.h
dom/bluetooth/bluetooth2/BluetoothGatt.h
dom/bluetooth/bluetooth2/BluetoothGattDescriptor.h
dom/bluetooth/bluetooth2/BluetoothPairingHandle.h
dom/bluetooth/bluetooth2/BluetoothPairingListener.h
dom/datastore/DataStoreCursor.h
dom/datastore/DataStoreDB.h
dom/events/EventDispatcher.h
dom/events/EventListenerManager.h
dom/events/EventTarget.h
dom/events/IMEStateManager.h
dom/fetch/Fetch.h
dom/fetch/FetchDriver.h
dom/fetch/Headers.h
dom/fetch/InternalHeaders.h
dom/fetch/InternalRequest.h
dom/fetch/Request.h
dom/fetch/Response.h
dom/filesystem/FileSystemTaskBase.h
dom/fmradio/FMRadio.h
dom/html/HTMLAllCollection.h
dom/html/HTMLFrameElement.h
dom/html/HTMLInputElement.h
dom/html/HTMLSourceElement.h
dom/html/HTMLTableCellElement.h
dom/html/HTMLTableRowElement.h
dom/html/UndoManager.h
dom/html/nsFormSubmission.h
dom/html/nsHTMLDocument.h
dom/html/nsIForm.h
dom/html/nsIFormControl.h
dom/html/nsIHTMLCollection.h
dom/html/nsIHTMLDocument.h
dom/html/nsIRadioGroupContainer.h
dom/ipc/BlobChild.h
dom/ipc/BlobParent.h
dom/ipc/ContentChild.h
dom/ipc/ContentParent.h
dom/ipc/CrashReporterParent.h
dom/ipc/PreallocatedProcessManager.h
dom/ipc/ProcessHangMonitor.h
dom/ipc/StructuredCloneUtils.h
dom/mobileconnection/MobileNetworkInfo.h
dom/nfc/MozNDEFRecord.h
dom/smil/nsISMILAttr.h
dom/tv/TVChannel.h
dom/xbl/XBLChildrenElement.h
dom/xbl/nsBindingManager.h
dom/xbl/nsXBLBinding.h
dom/xbl/nsXBLDocumentInfo.h
dom/xbl/nsXBLProtoImplField.h
dom/xbl/nsXBLProtoImplMember.h
dom/xslt/xpath/XPathExpression.h
dom/xslt/xpath/txExpr.h
dom/xslt/xpath/txExprParser.h
dom/xslt/xslt/txBufferingHandler.h
dom/xslt/xslt/txExecutionState.h
dom/xslt/xslt/txMozillaTextOutput.h
dom/xslt/xslt/txMozillaXMLOutput.h
dom/xslt/xslt/txMozillaXSLTProcessor.h
dom/xslt/xslt/txStylesheet.h
dom/xslt/xslt/txXSLTFunctions.h
dom/xslt/xslt/txXSLTPatterns.h
dom/xul/XULDocument.h
dom/xul/nsXULElement.h
dom/xul/templates/nsContentTestNode.h
dom/xul/templates/nsRuleNetwork.h
dom/xul/templates/nsXULContentUtils.h
dom/xul/templates/nsXULTemplateBuilder.h
dom/xul/templates/nsXULTemplateQueryProcessorRDF.h
--- a/dom/bindings/test/TestCImplementedInterface.h
+++ b/dom/bindings/test/TestCImplementedInterface.h
@@ -4,18 +4,16 @@
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
 #ifndef TestCImplementedInterface_h
 #define TestCImplementedInterface_h
 
 #include "../TestJSImplGenBinding.h"
 
-class nsPIDOMWindow;
-
 namespace mozilla {
 namespace dom {
 
 class TestCImplementedInterface : public TestJSImplInterface
 {
 public:
   TestCImplementedInterface(JS::Handle<JSObject*> aJSImpl,
                             nsIGlobalObject* aParent)
--- a/dom/bluetooth/bluedroid/BluetoothDaemonSocketInterface.h
+++ b/dom/bluetooth/bluedroid/BluetoothDaemonSocketInterface.h
@@ -10,18 +10,16 @@
 #include "BluetoothDaemonHelpers.h"
 #include "BluetoothInterface.h"
 #include "BluetoothInterfaceHelpers.h"
 
 BEGIN_BLUETOOTH_NAMESPACE
 
 using namespace mozilla::ipc;
 
-class BlutoothDaemonInterface;
-
 class BluetoothDaemonSocketModule
 {
 public:
   static const int MAX_NUM_CLIENTS;
 
   virtual nsresult Send(BluetoothDaemonPDU* aPDU, void* aUserData) = 0;
 
   // Commands
--- a/dom/bluetooth/bluedroid/hfp/BluetoothHfpManager.h
+++ b/dom/bluetooth/bluedroid/hfp/BluetoothHfpManager.h
@@ -12,17 +12,16 @@
 #include "BluetoothHfpManagerBase.h"
 #include "BluetoothRilListener.h"
 #include "BluetoothSocketObserver.h"
 #include "mozilla/ipc/SocketBase.h"
 #include "mozilla/Hal.h"
 
 BEGIN_BLUETOOTH_NAMESPACE
 
-class BluetoothReplyRunnable;
 class BluetoothSocket;
 class Call;
 
 /**
  * These costants are defined in 4.33.2 "AT Capabilities Re-Used from GSM 07.07
  * and 3GPP 27.007" in Bluetooth hands-free profile 1.6
  */
 enum BluetoothCmeError {
--- a/dom/bluetooth/bluetooth1/BluetoothDevice.h
+++ b/dom/bluetooth/bluetooth1/BluetoothDevice.h
@@ -13,17 +13,16 @@
 #include "BluetoothPropertyContainer.h"
 #include "nsString.h"
 
 BEGIN_BLUETOOTH_NAMESPACE
 
 class BluetoothNamedValue;
 class BluetoothValue;
 class BluetoothSignal;
-class BluetoothSocket;
 
 class BluetoothDevice : public DOMEventTargetHelper
                       , public BluetoothSignalObserver
                       , public BluetoothPropertyContainer
 {
 public:
   NS_DECL_ISUPPORTS_INHERITED
 
--- a/dom/bluetooth/bluetooth1/BluetoothPropertyContainer.h
+++ b/dom/bluetooth/bluetooth1/BluetoothPropertyContainer.h
@@ -5,17 +5,16 @@
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_dom_bluetooth_bluetoothpropertyobject_h__
 #define mozilla_dom_bluetooth_bluetoothpropertyobject_h__
 
 #include "BluetoothCommon.h"
 #include "BluetoothReplyRunnable.h"
 
-class nsIDOMDOMRequest;
 class nsPIDOMWindow;
 
 namespace mozilla {
 class ErrorResult;
 namespace dom {
 class DOMRequest;
 }
 }
--- a/dom/bluetooth/bluetooth1/BluetoothService.h
+++ b/dom/bluetooth/bluetooth1/BluetoothService.h
@@ -22,17 +22,16 @@ namespace mozilla {
 namespace dom {
 class BlobChild;
 class BlobParent;
 }
 }
 
 BEGIN_BLUETOOTH_NAMESPACE
 
-class BluetoothManager;
 class BluetoothNamedValue;
 class BluetoothReplyRunnable;
 class BluetoothSignal;
 
 typedef mozilla::ObserverList<BluetoothSignal> BluetoothSignalObserverList;
 
 class BluetoothService : public nsIObserver
                        , public BluetoothSignalObserver
--- a/dom/bluetooth/bluetooth2/BluetoothDevice.h
+++ b/dom/bluetooth/bluetooth2/BluetoothDevice.h
@@ -22,17 +22,16 @@ namespace dom {
 
 BEGIN_BLUETOOTH_NAMESPACE
 
 class BluetoothClassOfDevice;
 class BluetoothGatt;
 class BluetoothNamedValue;
 class BluetoothValue;
 class BluetoothSignal;
-class BluetoothSocket;
 
 class BluetoothDevice final : public DOMEventTargetHelper
                             , public BluetoothSignalObserver
 {
 public:
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(BluetoothDevice,
                                            DOMEventTargetHelper)
--- a/dom/bluetooth/bluetooth2/BluetoothDiscoveryHandle.h
+++ b/dom/bluetooth/bluetooth2/BluetoothDiscoveryHandle.h
@@ -11,17 +11,16 @@
 #include "mozilla/Attributes.h"
 #include "mozilla/dom/bluetooth/BluetoothTypes.h"
 #include "mozilla/DOMEventTargetHelper.h"
 #include "nsISupportsImpl.h"
 
 BEGIN_BLUETOOTH_NAMESPACE
 
 class BluetoothDevice;
-class BluetoothValue;
 
 class BluetoothDiscoveryHandle final : public DOMEventTargetHelper
 {
 public:
   NS_DECL_ISUPPORTS_INHERITED
 
   static already_AddRefed<BluetoothDiscoveryHandle>
     Create(nsPIDOMWindow* aWindow);
--- a/dom/bluetooth/bluetooth2/BluetoothGatt.h
+++ b/dom/bluetooth/bluetooth2/BluetoothGatt.h
@@ -17,18 +17,16 @@
 namespace mozilla {
 namespace dom {
 class Promise;
 }
 }
 
 BEGIN_BLUETOOTH_NAMESPACE
 
-class BluetoothReplyRunnable;
-class BluetoothService;
 class BluetoothSignal;
 class BluetoothValue;
 
 class BluetoothGatt final : public DOMEventTargetHelper
                           , public BluetoothSignalObserver
 {
 public:
   NS_DECL_ISUPPORTS_INHERITED
--- a/dom/bluetooth/bluetooth2/BluetoothGattDescriptor.h
+++ b/dom/bluetooth/bluetooth2/BluetoothGattDescriptor.h
@@ -15,17 +15,16 @@
 #include "nsCOMPtr.h"
 #include "nsWrapperCache.h"
 #include "nsPIDOMWindow.h"
 
 BEGIN_BLUETOOTH_NAMESPACE
 
 class BluetoothGattCharacteristic;
 class BluetoothSignal;
-class BluetoothValue;
 
 class BluetoothGattDescriptor final : public nsISupports
                                     , public nsWrapperCache
                                     , public BluetoothSignalObserver
 {
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(BluetoothGattDescriptor)
--- a/dom/bluetooth/bluetooth2/BluetoothPairingHandle.h
+++ b/dom/bluetooth/bluetooth2/BluetoothPairingHandle.h
@@ -14,18 +14,16 @@ namespace mozilla {
 class ErrorResult;
 namespace dom {
 class Promise;
 }
 }
 
 BEGIN_BLUETOOTH_NAMESPACE
 
-class BluetoothDevice;
-
 class BluetoothPairingHandle final : public nsISupports
                                    , public nsWrapperCache
 {
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(BluetoothPairingHandle)
 
   static already_AddRefed<BluetoothPairingHandle>
--- a/dom/bluetooth/bluetooth2/BluetoothPairingListener.h
+++ b/dom/bluetooth/bluetooth2/BluetoothPairingListener.h
@@ -8,17 +8,16 @@
 #define mozilla_dom_bluetooth_bluetoothpairinglistener_h
 
 #include "BluetoothCommon.h"
 #include "mozilla/Attributes.h"
 #include "mozilla/DOMEventTargetHelper.h"
 
 BEGIN_BLUETOOTH_NAMESPACE
 
-class BluetoothDevice;
 class BluetoothSignal;
 
 class BluetoothPairingListener final : public DOMEventTargetHelper
                                      , public BluetoothSignalObserver
 {
 public:
   NS_DECL_ISUPPORTS_INHERITED
 
--- a/dom/datastore/DataStoreCursor.h
+++ b/dom/datastore/DataStoreCursor.h
@@ -4,18 +4,16 @@
 
 #ifndef mozilla_dom_DataStoreCursor_h
 #define mozilla_dom_DataStoreCursor_h
 
 #include "nsAutoPtr.h"
 #include "nsCOMPtr.h"
 #include "nsCycleCollectionParticipant.h"
 
-class nsPIDOMWindow;
-
 namespace mozilla {
 
 class ErrorResult;
 
 namespace dom {
 
 class Promise;
 class DataStore;
--- a/dom/datastore/DataStoreDB.h
+++ b/dom/datastore/DataStoreDB.h
@@ -16,17 +16,16 @@
 #define DATASTOREDB_REVISION       "revision"
 
 namespace mozilla {
 namespace dom {
 
 namespace indexedDB {
 class IDBDatabase;
 class IDBFactory;
-class IDBObjectStore;
 class IDBOpenDBRequest;
 class IDBTransaction;
 }
 
 class DataStoreDBCallback;
 
 class DataStoreDB final : public nsIDOMEventListener
 {
--- a/dom/events/EventDispatcher.h
+++ b/dom/events/EventDispatcher.h
@@ -11,17 +11,16 @@
 #include "nsCOMPtr.h"
 #include "nsTArray.h"
 
 // Microsoft's API Name hackery sucks
 #undef CreateEvent
 
 class nsIContent;
 class nsIDOMEvent;
-class nsIScriptGlobalObject;
 class nsPresContext;
 
 template<class E> class nsCOMArray;
 
 namespace mozilla {
 namespace dom {
 class EventTarget;
 } // namespace dom
--- a/dom/events/EventListenerManager.h
+++ b/dom/events/EventListenerManager.h
@@ -14,17 +14,16 @@
 #include "nsCycleCollectionParticipant.h"
 #include "nsGkAtoms.h"
 #include "nsIDOMEventListener.h"
 #include "nsTObserverArray.h"
 
 class nsIDocShell;
 class nsIDOMEvent;
 class nsIEventListenerInfo;
-class nsIScriptContext;
 class nsPIDOMWindow;
 class JSTracer;
 
 struct EventTypeData;
 
 template<class T> class nsCOMArray;
 
 namespace mozilla {
--- a/dom/events/EventTarget.h
+++ b/dom/events/EventTarget.h
@@ -6,17 +6,16 @@
 #ifndef mozilla_dom_EventTarget_h_
 #define mozilla_dom_EventTarget_h_
 
 #include "nsIDOMEventTarget.h"
 #include "nsWrapperCache.h"
 #include "nsIAtom.h"
 
 class nsIDOMWindow;
-class nsIDOMEventListener;
 
 namespace mozilla {
 
 class ErrorResult;
 class EventListenerManager;
 
 namespace dom {
 
--- a/dom/events/IMEStateManager.h
+++ b/dom/events/IMEStateManager.h
@@ -8,17 +8,16 @@
 
 #include "mozilla/EventForwards.h"
 #include "nsIWidget.h"
 
 class nsIContent;
 class nsIDOMMouseEvent;
 class nsIEditor;
 class nsINode;
-class nsPIDOMWindow;
 class nsPresContext;
 class nsISelection;
 
 namespace mozilla {
 
 class EventDispatchingCallback;
 class IMEContentObserver;
 class TextCompositionArray;
--- a/dom/fetch/Fetch.h
+++ b/dom/fetch/Fetch.h
@@ -15,17 +15,16 @@
 #include "nsString.h"
 
 #include "mozilla/DebugOnly.h"
 #include "mozilla/ErrorResult.h"
 #include "mozilla/dom/Promise.h"
 #include "mozilla/dom/RequestBinding.h"
 #include "mozilla/dom/workers/bindings/WorkerFeature.h"
 
-class nsIOutputStream;
 class nsIGlobalObject;
 
 namespace mozilla {
 namespace dom {
 
 class ArrayBufferOrArrayBufferViewOrBlobOrFormDataOrUSVStringOrURLSearchParams;
 class InternalRequest;
 class OwningArrayBufferOrArrayBufferViewOrBlobOrFormDataOrUSVStringOrURLSearchParams;
--- a/dom/fetch/FetchDriver.h
+++ b/dom/fetch/FetchDriver.h
@@ -19,17 +19,16 @@
 class nsIDocument;
 class nsIOutputStream;
 class nsILoadGroup;
 class nsIPrincipal;
 
 namespace mozilla {
 namespace dom {
 
-class BlobSet;
 class InternalRequest;
 class InternalResponse;
 
 class FetchDriverObserver
 {
 public:
   NS_INLINE_DECL_THREADSAFE_REFCOUNTING(FetchDriverObserver);
   virtual void OnResponseAvailable(InternalResponse* aResponse) = 0;
--- a/dom/fetch/Headers.h
+++ b/dom/fetch/Headers.h
@@ -9,18 +9,16 @@
 
 #include "mozilla/dom/HeadersBinding.h"
 
 #include "nsClassHashtable.h"
 #include "nsWrapperCache.h"
 
 #include "InternalHeaders.h"
 
-class nsPIDOMWindow;
-
 namespace mozilla {
 
 class ErrorResult;
 
 namespace dom {
 
 template<typename T> class MozMap;
 class HeadersOrByteStringSequenceSequenceOrByteStringMozMap;
--- a/dom/fetch/InternalHeaders.h
+++ b/dom/fetch/InternalHeaders.h
@@ -9,26 +9,23 @@
 
 // needed for HeadersGuardEnum.
 #include "mozilla/dom/HeadersBinding.h"
 #include "mozilla/dom/UnionTypes.h"
 
 #include "nsClassHashtable.h"
 #include "nsWrapperCache.h"
 
-class nsPIDOMWindow;
-
 namespace mozilla {
 
 class ErrorResult;
 
 namespace dom {
 
 template<typename T> class MozMap;
-class HeadersOrByteStringSequenceSequenceOrByteStringMozMap;
 
 class InternalHeaders final
 {
   NS_INLINE_DECL_THREADSAFE_REFCOUNTING(InternalHeaders)
 
 public:
   struct Entry
   {
--- a/dom/fetch/InternalRequest.h
+++ b/dom/fetch/InternalRequest.h
@@ -14,19 +14,16 @@
 #include "nsIInputStream.h"
 #include "nsISupportsImpl.h"
 #ifdef DEBUG
 #include "nsIURLParser.h"
 #include "nsNetCID.h"
 #include "nsServiceManagerUtils.h"
 #endif
 
-class nsIDocument;
-class nsPIDOMWindow;
-
 namespace mozilla {
 namespace dom {
 
 /*
  * The mapping of RequestContext and nsContentPolicyType is currently as the
  * following.  Note that this mapping is not perfect yet (see the TODO comments
  * below for examples), so for now we'll have to keep both an mContext and an
  * mContentPolicyType, because we cannot have a two way conversion.
@@ -79,17 +76,16 @@ namespace dom {
  * TODO: Add a content type for location
  * TODO: Add a content type for hyperlink
  * TODO: Add a content type for form
  * TODO: Add a content type for favicon
  * TODO: Add a content type for download
  * TODO: Split TYPE_OBJECT into TYPE_EMBED and TYPE_OBJECT
  */
 
-class FetchBodyStream;
 class Request;
 
 #define kFETCH_CLIENT_REFERRER_STR "about:client"
 
 class InternalRequest final
 {
   friend class Request;
 
--- a/dom/fetch/Request.h
+++ b/dom/fetch/Request.h
@@ -11,24 +11,21 @@
 #include "nsWrapperCache.h"
 
 #include "mozilla/dom/Fetch.h"
 #include "mozilla/dom/InternalRequest.h"
 // Required here due to certain WebIDL enums/classes being declared in both
 // files.
 #include "mozilla/dom/RequestBinding.h"
 
-class nsPIDOMWindow;
-
 namespace mozilla {
 namespace dom {
 
 class Headers;
 class InternalHeaders;
-class Promise;
 class RequestOrUSVString;
 
 class Request final : public nsISupports
                     , public FetchBody<Request>
                     , public nsWrapperCache
 {
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(Request)
--- a/dom/fetch/Response.h
+++ b/dom/fetch/Response.h
@@ -9,25 +9,21 @@
 #include "nsWrapperCache.h"
 #include "nsISupportsImpl.h"
 
 #include "mozilla/dom/Fetch.h"
 #include "mozilla/dom/ResponseBinding.h"
 
 #include "InternalResponse.h"
 
-class nsPIDOMWindow;
-
 namespace mozilla {
 namespace dom {
 
-class ArrayBufferOrArrayBufferViewOrUSVStringOrURLSearchParams;
 class Headers;
 class InternalHeaders;
-class Promise;
 
 class Response final : public nsISupports
                      , public FetchBody<Response>
                      , public nsWrapperCache
 {
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(Response)
 
--- a/dom/filesystem/FileSystemTaskBase.h
+++ b/dom/filesystem/FileSystemTaskBase.h
@@ -14,17 +14,16 @@
 class nsIDOMFile;
 
 namespace mozilla {
 namespace dom {
 
 class BlobParent;
 class FileSystemBase;
 class FileSystemParams;
-class Promise;
 
 /*
  * The base class to implement a Task class.
  * The task is used to handle the OOP (out of process) operations.
  * The file system operations can only be performed in the parent process. When
  * performing such a parent-process-only operation, a task will delivered the
  * operation to the parent process if needed.
  *
--- a/dom/fmradio/FMRadio.h
+++ b/dom/fmradio/FMRadio.h
@@ -9,17 +9,16 @@
 #include "AudioChannelAgent.h"
 #include "FMRadioCommon.h"
 #include "mozilla/DOMEventTargetHelper.h"
 #include "mozilla/HalTypes.h"
 #include "nsCycleCollectionParticipant.h"
 #include "nsWeakReference.h"
 
 class nsPIDOMWindow;
-class nsIScriptContext;
 
 BEGIN_FMRADIO_NAMESPACE
 
 class DOMRequest;
 
 class FMRadio final : public DOMEventTargetHelper
                     , public hal::SwitchObserver
                     , public FMRadioEventObserver
--- a/dom/html/HTMLAllCollection.h
+++ b/dom/html/HTMLAllCollection.h
@@ -16,19 +16,16 @@
 #include <stdint.h>
 
 class nsContentList;
 class nsHTMLDocument;
 class nsIContent;
 class nsINode;
 
 namespace mozilla {
-
-class ErrorResult;
-
 namespace dom {
 
 class OwningNodeOrHTMLCollection;
 template<typename> struct Nullable;
 
 class HTMLAllCollection final : public nsISupports
                               , public nsWrapperCache
 {
--- a/dom/html/HTMLFrameElement.h
+++ b/dom/html/HTMLFrameElement.h
@@ -6,18 +6,16 @@
 #ifndef mozilla_dom_HTMLFrameElement_h
 #define mozilla_dom_HTMLFrameElement_h
 
 #include "mozilla/Attributes.h"
 #include "nsIDOMHTMLFrameElement.h"
 #include "nsGenericHTMLFrameElement.h"
 #include "nsGkAtoms.h"
 
-class nsIDOMDocument;
-
 namespace mozilla {
 namespace dom {
 
 class HTMLFrameElement final : public nsGenericHTMLFrameElement,
                                public nsIDOMHTMLFrameElement
 {
 public:
   using nsGenericHTMLFrameElement::SwapFrameLoaders;
--- a/dom/html/HTMLInputElement.h
+++ b/dom/html/HTMLInputElement.h
@@ -20,17 +20,16 @@
 #include "mozilla/dom/HTMLInputElementBinding.h"
 #include "nsIFilePicker.h"
 #include "nsIContentPrefService2.h"
 #include "mozilla/Decimal.h"
 #include "nsContentUtils.h"
 #include "nsTextEditorState.h"
 
 class nsIRadioGroupContainer;
-class nsIRadioGroupVisitor;
 class nsIRadioVisitor;
 
 namespace mozilla {
 
 class EventChainPostVisitor;
 class EventChainPreVisitor;
 
 namespace dom {
--- a/dom/html/HTMLSourceElement.h
+++ b/dom/html/HTMLSourceElement.h
@@ -12,17 +12,16 @@
 #include "nsGenericHTMLElement.h"
 #include "mozilla/dom/HTMLMediaElement.h"
 
 class nsMediaList;
 
 namespace mozilla {
 namespace dom {
 
-class ResponsiveImageSelector;
 class HTMLSourceElement final : public nsGenericHTMLElement,
                                 public nsIDOMHTMLSourceElement
 {
 public:
   explicit HTMLSourceElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo);
 
   // nsISupports
   NS_DECL_ISUPPORTS_INHERITED
--- a/dom/html/HTMLTableCellElement.h
+++ b/dom/html/HTMLTableCellElement.h
@@ -4,18 +4,16 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 #ifndef mozilla_dom_HTMLTableCellElement_h
 #define mozilla_dom_HTMLTableCellElement_h
 
 #include "mozilla/Attributes.h"
 #include "nsGenericHTMLElement.h"
 #include "nsIDOMHTMLTableCellElement.h"
 
-class nsIDOMHTMLTableRowElement;
-
 namespace mozilla {
 namespace dom {
 
 class HTMLTableElement;
 
 class HTMLTableCellElement final : public nsGenericHTMLElement,
                                    public nsIDOMHTMLTableCellElement
 {
--- a/dom/html/HTMLTableRowElement.h
+++ b/dom/html/HTMLTableRowElement.h
@@ -3,17 +3,16 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 #ifndef mozilla_dom_HTMLTableRowElement_h
 #define mozilla_dom_HTMLTableRowElement_h
 
 #include "mozilla/Attributes.h"
 #include "nsGenericHTMLElement.h"
 
-class nsIDOMHTMLTableElement;
 class nsContentList;
 
 namespace mozilla {
 namespace dom {
 
 class HTMLTableSectionElement;
 
 class HTMLTableRowElement final : public nsGenericHTMLElement
--- a/dom/html/UndoManager.h
+++ b/dom/html/UndoManager.h
@@ -11,17 +11,16 @@
 #include "nsCOMPtr.h"
 #include "nsCOMArray.h"
 #include "nsIContent.h"
 #include "nsTArray.h"
 #include "nsWrapperCache.h"
 #include "mozilla/dom/Nullable.h"
 
 class nsITransactionManager;
-class nsIMutationObserver;
 
 namespace mozilla {
 class ErrorResult;
 namespace dom {
 
 class DOMTransaction;
 class DOMTransactionCallback;
 
--- a/dom/html/nsFormSubmission.h
+++ b/dom/html/nsFormSubmission.h
@@ -7,22 +7,17 @@
 
 #include "mozilla/Attributes.h"
 #include "nsString.h"
 #include "nsCOMPtr.h"
 
 class nsIURI;
 class nsIInputStream;
 class nsGenericHTMLElement;
-class nsILinkHandler;
 class nsIContent;
-class nsIFormControl;
-class nsIDOMHTMLElement;
-class nsIDocShell;
-class nsIRequest;
 class nsISaveAsCharset;
 class nsIMultiplexInputStream;
 
 namespace mozilla {
 namespace dom {
 class File;
 } // namespace dom
 } // namespace mozilla
--- a/dom/html/nsHTMLDocument.h
+++ b/dom/html/nsHTMLDocument.h
@@ -17,17 +17,16 @@
 #include "pldhash.h"
 #include "nsIHttpChannel.h"
 #include "nsHTMLStyleSheet.h"
 
 #include "nsICommandManager.h"
 #include "mozilla/dom/HTMLSharedElement.h"
 
 class nsIEditor;
-class nsIParser;
 class nsIURI;
 class nsIDocShell;
 class nsICachingChannel;
 class nsIWyciwygChannel;
 class nsILoadGroup;
 
 namespace mozilla {
 namespace dom {
--- a/dom/html/nsIForm.h
+++ b/dom/html/nsIForm.h
@@ -4,18 +4,16 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 #ifndef nsIForm_h___
 #define nsIForm_h___
 
 #include "nsISupports.h"
 #include "nsAString.h"
 
 class nsIFormControl;
-class nsISimpleEnumerator;
-class nsIURI;
 
 #define NS_FORM_METHOD_GET  0
 #define NS_FORM_METHOD_POST 1
 #define NS_FORM_ENCTYPE_URLENCODED 0
 #define NS_FORM_ENCTYPE_MULTIPART  1
 #define NS_FORM_ENCTYPE_TEXTPLAIN  2
 
 // IID for the nsIForm interface
--- a/dom/html/nsIFormControl.h
+++ b/dom/html/nsIFormControl.h
@@ -3,18 +3,16 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 #ifndef nsIFormControl_h___
 #define nsIFormControl_h___
 
 #include "nsISupports.h"
 class nsIDOMHTMLFormElement;
 class nsPresState;
-class nsString;
-class nsIFormProcessor;
 class nsFormSubmission;
 
 namespace mozilla {
 namespace dom {
 class Element;
 class HTMLFieldSetElement;
 } // namespace dom
 } // namespace mozilla
--- a/dom/html/nsIHTMLCollection.h
+++ b/dom/html/nsIHTMLCollection.h
@@ -10,18 +10,16 @@
 #include "nsTArrayForwardDeclare.h"
 #include "nsWrapperCache.h"
 #include "js/TypeDecls.h"
 
 class nsINode;
 class nsString;
 
 namespace mozilla {
-class ErrorResult;
-
 namespace dom {
 class Element;
 } // namespace dom
 } // namespace mozilla
 
 // IID for the nsIHTMLCollection interface
 #define NS_IHTMLCOLLECTION_IID \
 { 0x4e169191, 0x5196, 0x4e17, \
--- a/dom/html/nsIHTMLDocument.h
+++ b/dom/html/nsIHTMLDocument.h
@@ -4,22 +4,19 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef nsIHTMLDocument_h
 #define nsIHTMLDocument_h
 
 #include "nsISupports.h"
 #include "nsCompatibility.h"
 
-class nsIDOMHTMLFormElement;
 class nsIContent;
-class nsIScriptElement;
 class nsIEditor;
 class nsContentList;
-class nsWrapperCache;
 
 #define NS_IHTMLDOCUMENT_IID \
 { 0xcf814492, 0x303c, 0x4718, \
   { 0x9a, 0x3e, 0x39, 0xbc, 0xd5, 0x2c, 0x10, 0xdb } }
 
 /**
  * HTML document extensions to nsIDocument.
  */
--- a/dom/html/nsIRadioGroupContainer.h
+++ b/dom/html/nsIRadioGroupContainer.h
@@ -2,17 +2,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 #ifndef nsIRadioGroupContainer_h___
 #define nsIRadioGroupContainer_h___
 
 #include "nsISupports.h"
 
-class nsString;
 class nsIRadioVisitor;
 class nsIFormControl;
 
 namespace mozilla {
 namespace dom {
 class HTMLInputElement;
 }
 }
--- a/dom/ipc/BlobChild.h
+++ b/dom/ipc/BlobChild.h
@@ -5,17 +5,16 @@
 #ifndef mozilla_dom_ipc_BlobChild_h
 #define mozilla_dom_ipc_BlobChild_h
 
 #include "mozilla/Attributes.h"
 #include "mozilla/dom/PBlobChild.h"
 #include "nsCOMPtr.h"
 #include "nsID.h"
 
-class nsIDOMBlob;
 class nsIEventTarget;
 class nsIRemoteBlob;
 class nsString;
 
 namespace mozilla {
 namespace ipc {
 
 class PBackgroundChild;
--- a/dom/ipc/BlobParent.h
+++ b/dom/ipc/BlobParent.h
@@ -9,17 +9,16 @@
 #include "mozilla/StaticPtr.h"
 #include "mozilla/dom/PBlobParent.h"
 #include "nsAutoPtr.h"
 #include "nsCOMPtr.h"
 #include "nsTArray.h"
 
 template <class, class> class nsDataHashtable;
 class nsIDHashKey;
-class nsIDOMBlob;
 class nsIEventTarget;
 class nsIRemoteBlob;
 template <class> class nsRevocableEventPtr;
 class nsString;
 
 namespace mozilla {
 
 class Mutex;
--- a/dom/ipc/ContentChild.h
+++ b/dom/ipc/ContentChild.h
@@ -15,43 +15,37 @@
 #include "nsHashKeys.h"
 #include "nsIObserver.h"
 #include "nsTHashtable.h"
 
 #include "nsWeakPtr.h"
 
 
 struct ChromePackage;
-class nsIDOMBlob;
 class nsIObserver;
 struct ResourceMapping;
 struct OverrideMapping;
 class nsIDomainPolicy;
 
 namespace mozilla {
 class RemoteSpellcheckEngineChild;
 
 namespace ipc {
 class OptionalURIParams;
 class PFileDescriptorSetChild;
 class URIParams;
 }// namespace ipc
 
-namespace jsipc {
-class JavaScriptShared;
-}
-
 namespace layers {
 class PCompositorChild;
 } // namespace layers
 
 namespace dom {
 
 class AlertObserver;
-class PrefObserver;
 class ConsoleListener;
 class PStorageChild;
 class ClonedMessageData;
 class TabChild;
 
 class ContentChild final : public PContentChild
                          , public nsIContentChild
 {
--- a/dom/ipc/ContentParent.h
+++ b/dom/ipc/ContentParent.h
@@ -25,35 +25,32 @@
 #include "nsIDOMGeoPositionErrorCallback.h"
 #include "PermissionMessageUtils.h"
 
 #define CHILD_PROCESS_SHUTDOWN_MESSAGE NS_LITERAL_STRING("child-process-shutdown")
 
 class mozIApplication;
 class nsConsoleService;
 class nsICycleCollectorLogSink;
-class nsIDOMBlob;
 class nsIDumpGCAndCCLogsCallback;
-class nsIMemoryReporter;
 class nsITimer;
 class ParentIdleListener;
 class nsIWidget;
 
 namespace mozilla {
 class PRemoteSpellcheckEngineParent;
 
 namespace ipc {
 class OptionalURIParams;
 class PFileDescriptorSetParent;
 class URIParams;
 class TestShellParent;
 } // namespace ipc
 
 namespace jsipc {
-class JavaScriptShared;
 class PJavaScriptParent;
 }
 
 namespace layers {
 class PCompositorParent;
 class PSharedBufferManagerParent;
 } // namespace layers
 
--- a/dom/ipc/CrashReporterParent.h
+++ b/dom/ipc/CrashReporterParent.h
@@ -12,17 +12,16 @@
 #include "nsIFile.h"
 #ifdef MOZ_CRASHREPORTER
 #include "nsExceptionHandler.h"
 #include "nsDataHashtable.h"
 #endif
 
 namespace mozilla {
 namespace dom {
-class ProcessReporter;
 
 class CrashReporterParent :
     public PCrashReporterParent
 {
 #ifdef MOZ_CRASHREPORTER
   typedef CrashReporter::AnnotationTable AnnotationTable;
 #endif
 public:
--- a/dom/ipc/PreallocatedProcessManager.h
+++ b/dom/ipc/PreallocatedProcessManager.h
@@ -6,18 +6,16 @@
 
 #ifndef mozilla_PreallocatedProcessManager_h
 #define mozilla_PreallocatedProcessManager_h
 
 #include "base/basictypes.h"
 #include "nsCOMPtr.h"
 #include "nsIObserver.h"
 
-class nsIRunnable;
-
 namespace mozilla {
 namespace dom {
 class ContentParent;
 }
 
 /**
  * This class manages a ContentParent that it starts up ahead of any particular
  * need.  You can then call Take() to get this process and use it.  Since we
--- a/dom/ipc/ProcessHangMonitor.h
+++ b/dom/ipc/ProcessHangMonitor.h
@@ -5,33 +5,31 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_ProcessHangMonitor_h
 #define mozilla_ProcessHangMonitor_h
 
 #include "mozilla/Atomics.h"
 #include "nsIObserver.h"
 
-class nsGlobalWindow;
 class nsITabChild;
 
 class MessageLoop;
 
 namespace base {
 class Thread;
 };
 
 namespace mozilla {
 
 namespace dom {
 class ContentParent;
 }
 
 class PProcessHangMonitorParent;
-class PProcessHangMonitorChild;
 
 class ProcessHangMonitor final
   : public nsIObserver
 {
  private:
   ProcessHangMonitor();
   virtual ~ProcessHangMonitor();
 
--- a/dom/ipc/StructuredCloneUtils.h
+++ b/dom/ipc/StructuredCloneUtils.h
@@ -9,19 +9,16 @@
 
 #include "nsCOMPtr.h"
 #include "nsTArray.h"
 #include "mozilla/dom/File.h"
 
 #include "js/StructuredClone.h"
 
 namespace mozilla {
-
-struct SerializedStructuredCloneBuffer;
-
 namespace dom {
 
 struct
 StructuredCloneClosure
 {
   nsTArray<nsRefPtr<File>> mBlobs;
 };
 
--- a/dom/mobileconnection/MobileNetworkInfo.h
+++ b/dom/mobileconnection/MobileNetworkInfo.h
@@ -10,18 +10,16 @@
 #include "mozilla/dom/MozMobileNetworkInfoBinding.h"
 #include "nsIMobileNetworkInfo.h"
 #include "nsPIDOMWindow.h"
 #include "nsWrapperCache.h"
 
 namespace mozilla {
 namespace dom {
 
-class GlobalObject;
-
 class MobileNetworkInfo final : public nsIMobileNetworkInfo
                               , public nsWrapperCache
 {
 public:
   NS_DECL_NSIMOBILENETWORKINFO
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(MobileNetworkInfo)
 
--- a/dom/nfc/MozNDEFRecord.h
+++ b/dom/nfc/MozNDEFRecord.h
@@ -16,17 +16,16 @@
 #include "jsapi.h"
 
 #include "mozilla/dom/MozNDEFRecordBinding.h"
 #include "mozilla/dom/TypedArray.h"
 #include "jsfriendapi.h"
 #include "js/GCAPI.h"
 #include "nsISupports.h"
 
-class nsIGlobalObject;
 struct JSContext;
 struct JSStructuredCloneWriter;
 
 namespace mozilla {
 namespace dom {
 
 class MozNDEFRecordOptions;
 
--- a/dom/smil/nsISMILAttr.h
+++ b/dom/smil/nsISMILAttr.h
@@ -4,17 +4,16 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef NS_ISMILATTR_H_
 #define NS_ISMILATTR_H_
 
 #include "nscore.h"
 
 class nsSMILValue;
-class nsISMILType;
 class nsIContent;
 class nsAString;
 
 namespace mozilla {
 namespace dom {
 class SVGAnimationElement;
 }
 }
--- a/dom/tv/TVChannel.h
+++ b/dom/tv/TVChannel.h
@@ -13,17 +13,16 @@
 
 class nsITVChannelData;
 class nsITVService;
 
 namespace mozilla {
 namespace dom {
 
 class Promise;
-class TVProgram;
 class TVSource;
 
 class TVChannel final : public DOMEventTargetHelper
 {
 public:
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(TVChannel, DOMEventTargetHelper)
 
--- a/dom/xbl/XBLChildrenElement.h
+++ b/dom/xbl/XBLChildrenElement.h
@@ -12,18 +12,16 @@
 #include "nsBindingManager.h"
 #include "mozilla/dom/nsXMLElement.h"
 
 class nsAnonymousContentList;
 
 namespace mozilla {
 namespace dom {
 
-class ExplicitChildIterator;
-
 class XBLChildrenElement : public nsXMLElement
 {
 public:
   explicit XBLChildrenElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo)
     : nsXMLElement(aNodeInfo)
   {
   }
   explicit XBLChildrenElement(already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
--- a/dom/xbl/nsBindingManager.h
+++ b/dom/xbl/nsBindingManager.h
@@ -20,17 +20,16 @@
 struct ElementDependentRuleProcessorData;
 class nsIXPConnectWrappedJS;
 class nsIAtom;
 class nsIDOMNodeList;
 class nsIDocument;
 class nsIURI;
 class nsXBLDocumentInfo;
 class nsIStreamListener;
-class nsStyleSet;
 class nsXBLBinding;
 template<class E> class nsRefPtr;
 typedef nsTArray<nsRefPtr<nsXBLBinding> > nsBindingList;
 class nsIPrincipal;
 class nsITimer;
 
 namespace mozilla {
 class CSSStyleSheet;
--- a/dom/xbl/nsXBLBinding.h
+++ b/dom/xbl/nsXBLBinding.h
@@ -16,17 +16,16 @@
 #include "nsCycleCollectionParticipant.h"
 #include "nsISupportsImpl.h"
 #include "js/TypeDecls.h"
 
 class nsXBLPrototypeBinding;
 class nsIContent;
 class nsIAtom;
 class nsIDocument;
-class nsIScriptContext;
 
 namespace mozilla {
 namespace dom {
 
 class ShadowRoot;
 class XBLChildrenElement;
 
 } // namespace dom
--- a/dom/xbl/nsXBLDocumentInfo.h
+++ b/dom/xbl/nsXBLDocumentInfo.h
@@ -8,17 +8,16 @@
 #include "mozilla/Attributes.h"
 #include "nsCOMPtr.h"
 #include "nsAutoPtr.h"
 #include "nsWeakReference.h"
 #include "nsIDocument.h"
 #include "nsCycleCollectionParticipant.h"
 
 class nsXBLPrototypeBinding;
-class nsXBLDocGlobalObject;
 
 class nsXBLDocumentInfo final : public nsSupportsWeakReference
 {
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
 
   explicit nsXBLDocumentInfo(nsIDocument* aDocument);
 
--- a/dom/xbl/nsXBLProtoImplField.h
+++ b/dom/xbl/nsXBLProtoImplField.h
@@ -9,17 +9,16 @@
 #include "nsIAtom.h"
 #include "nsString.h"
 #include "jsapi.h"
 #include "nsString.h"
 #include "nsXBLProtoImplMember.h"
 
 class nsIObjectInputStream;
 class nsIObjectOutputStream;
-class nsIScriptContext;
 class nsIURI;
 
 class nsXBLProtoImplField
 {
 public:
   nsXBLProtoImplField(const char16_t* aName, const char16_t* aReadOnly);
   explicit nsXBLProtoImplField(const bool aIsReadOnly);
   ~nsXBLProtoImplField();
--- a/dom/xbl/nsXBLProtoImplMember.h
+++ b/dom/xbl/nsXBLProtoImplMember.h
@@ -8,17 +8,16 @@
 
 #include "nsIAtom.h"
 #include "nsString.h"
 #include "nsString.h"
 #include "nsIServiceManager.h"
 #include "nsContentUtils.h" // For NS_CONTENT_DELETE_LIST_MEMBER.
 #include "nsCycleCollectionParticipant.h"
 
-class nsIContent;
 class nsIObjectOutputStream;
 
 struct nsXBLTextWithLineNumber
 {
   char16_t* mText;
   uint32_t mLineNumber;
 
   nsXBLTextWithLineNumber() :
--- a/dom/xslt/xpath/XPathExpression.h
+++ b/dom/xslt/xpath/XPathExpression.h
@@ -12,17 +12,16 @@
 #include "mozilla/Attributes.h"
 #include "mozilla/dom/NonRefcountedDOMObject.h"
 #include "mozilla/dom/XPathExpressionBinding.h"
 
 class Expr;
 class nsIDocument;
 class nsINode;
 class txResultRecycler;
-class txXPathNode;
 
 namespace mozilla {
 namespace dom {
 
 class XPathResult;
 
 /**
  * A class for evaluating an XPath expression string
--- a/dom/xslt/xpath/txExpr.h
+++ b/dom/xslt/xpath/txExpr.h
@@ -19,17 +19,16 @@
 #endif
 
 /*
   XPath class definitions.
   Much of this code was ported from XSL:P.
 */
 
 class nsIAtom;
-class txIParseContext;
 class txIMatchContext;
 class txIEvalContext;
 class txNodeSet;
 class txXPathNode;
 
 /**
  * A Base Class for all XSL Expressions
 **/
--- a/dom/xslt/xpath/txExprParser.h
+++ b/dom/xslt/xpath/txExprParser.h
@@ -11,27 +11,25 @@
 
 #ifndef MITREXSL_EXPRPARSER_H
 #define MITREXSL_EXPRPARSER_H
 
 #include "txCore.h"
 #include "nsAutoPtr.h"
 #include "nsString.h"
 
-class AttributeValueTemplate;
 class Expr;
 class txExprLexer;
 class FunctionCall;
 class LocationStep;
 class nsIAtom;
 class PredicateList;
 class Token;
 class txIParseContext;
 class txNodeTest;
-class txNodeTypeTest;
 
 class txExprParser
 {
 public:
 
     static nsresult createExpr(const nsSubstring& aExpression,
                                txIParseContext* aContext, Expr** aExpr)
     {
--- a/dom/xslt/xslt/txBufferingHandler.h
+++ b/dom/xslt/xslt/txBufferingHandler.h
@@ -7,17 +7,16 @@
 #define txBufferingHandler_h__
 
 #include "txXMLEventHandler.h"
 #include "nsString.h"
 #include "nsTArray.h"
 #include "nsAutoPtr.h"
 
 class txOutputTransaction;
-class txCharacterTransaction;
 
 class txResultBuffer
 {
 public:
     txResultBuffer();
     ~txResultBuffer();
 
     nsresult addTransaction(txOutputTransaction* aTransaction);
--- a/dom/xslt/xslt/txExecutionState.h
+++ b/dom/xslt/xslt/txExecutionState.h
@@ -16,17 +16,16 @@
 #include "txKey.h"
 #include "txStylesheet.h"
 #include "txXPathTreeWalker.h"
 #include "nsTArray.h"
 
 class txAOutputHandlerFactory;
 class txAXMLEventHandler;
 class txInstruction;
-class txIOutputHandlerFactory;
 
 class txLoadedDocumentEntry : public nsStringHashKey
 {
 public:
     explicit txLoadedDocumentEntry(KeyTypePointer aStr) : nsStringHashKey(aStr),
                                                           mLoadResult(NS_OK)
     {
     }
--- a/dom/xslt/xslt/txMozillaTextOutput.h
+++ b/dom/xslt/xslt/txMozillaTextOutput.h
@@ -6,17 +6,16 @@
 #ifndef TRANSFRMX_MOZILLA_TEXT_OUTPUT_H
 #define TRANSFRMX_MOZILLA_TEXT_OUTPUT_H
 
 #include "txXMLEventHandler.h"
 #include "nsCOMPtr.h"
 #include "nsWeakPtr.h"
 #include "txOutputFormat.h"
 
-class nsIDOMCharacterData;
 class nsIDOMDocument;
 class nsIDOMDocumentFragment;
 class nsITransformObserver;
 class nsIDocument;
 class nsIContent;
 
 class txMozillaTextOutput : public txAOutputXMLEventHandler
 {
--- a/dom/xslt/xslt/txMozillaXMLOutput.h
+++ b/dom/xslt/xslt/txMozillaXMLOutput.h
@@ -15,19 +15,16 @@
 #include "txStack.h"
 #include "mozilla/Attributes.h"
 #include "mozilla/dom/Element.h"
 
 class nsIContent;
 class nsIDOMDocument;
 class nsIAtom;
 class nsIDOMDocumentFragment;
-class nsIDOMElement;
-class nsIStyleSheet;
-class nsIDOMNode;
 class nsITransformObserver;
 class nsNodeInfoManager;
 class nsIDocument;
 class nsINode;
 
 class txTransformNotifier final : public nsIScriptLoaderObserver,
                                   public nsICSSLoaderObserver
 {
--- a/dom/xslt/xslt/txMozillaXSLTProcessor.h
+++ b/dom/xslt/xslt/txMozillaXSLTProcessor.h
@@ -17,17 +17,16 @@
 #include "nsWrapperCache.h"
 #include "mozilla/Attributes.h"
 #include "mozilla/ErrorResult.h"
 #include "mozilla/net/ReferrerPolicy.h"
 
 class nsINode;
 class nsIDOMNode;
 class nsIURI;
-class nsIXMLContentSink;
 class txStylesheet;
 class txResultRecycler;
 class txIGlobalParameter;
 
 namespace mozilla {
 namespace dom {
 
 class Document;
--- a/dom/xslt/xslt/txStylesheet.h
+++ b/dom/xslt/xslt/txStylesheet.h
@@ -8,17 +8,16 @@
 
 #include "txOutputFormat.h"
 #include "txExpandedNameMap.h"
 #include "txList.h"
 #include "txXSLTPatterns.h"
 #include "nsISupportsImpl.h"
 
 class txInstruction;
-class txToplevelItem;
 class txTemplateItem;
 class txVariableItem;
 class txStripSpaceItem;
 class txAttributeSetItem;
 class txDecimalFormat;
 class txStripSpaceTest;
 class txXSLKey;
 
--- a/dom/xslt/xslt/txXSLTFunctions.h
+++ b/dom/xslt/xslt/txXSLTFunctions.h
@@ -6,20 +6,17 @@
 #ifndef TRANSFRMX_XSLT_FUNCTIONS_H
 #define TRANSFRMX_XSLT_FUNCTIONS_H
 
 #include "txExpr.h"
 #include "txXMLUtils.h"
 #include "nsAutoPtr.h"
 #include "txNamespaceMap.h"
 
-class txPattern;
 class txStylesheet;
-class txKeyValueHashKey;
-class txExecutionState;
 
 /**
  * The definition for the XSLT document() function
 **/
 class DocumentFunctionCall : public FunctionCall {
 
 public:
 
--- a/dom/xslt/xslt/txXSLTPatterns.h
+++ b/dom/xslt/xslt/txXSLTPatterns.h
@@ -6,18 +6,16 @@
 #ifndef TX_XSLT_PATTERNS_H
 #define TX_XSLT_PATTERNS_H
 
 #include "mozilla/Attributes.h"
 #include "txExpandedName.h"
 #include "txExpr.h"
 #include "txXMLUtils.h"
 
-class ProcessorState;
-
 class txPattern
 {
 public:
     txPattern()
     {
         MOZ_COUNT_CTOR(txPattern);
     }
     virtual ~txPattern()
--- a/dom/xul/XULDocument.h
+++ b/dom/xul/XULDocument.h
@@ -30,17 +30,16 @@
 #include "js/TypeDecls.h"
 
 class nsIRDFResource;
 class nsIRDFService;
 class nsPIWindowRoot;
 #if 0 // XXXbe save me, scc (need NSCAP_FORWARD_DECL(nsXULPrototypeScript))
 class nsIObjectInputStream;
 class nsIObjectOutputStream;
-class nsIXULPrototypeScript;
 #else
 #include "nsIObjectInputStream.h"
 #include "nsIObjectOutputStream.h"
 #include "nsXULElement.h"
 #endif
 #include "nsURIHashKey.h"
 #include "nsInterfaceHashtable.h"
 
--- a/dom/xul/nsXULElement.h
+++ b/dom/xul/nsXULElement.h
@@ -33,17 +33,16 @@
 #include "nsStyledElement.h"
 #include "nsIFrameLoader.h"
 #include "nsFrameLoader.h"
 #include "mozilla/dom/DOMRect.h"
 #include "mozilla/dom/ElementInlines.h"
 
 class nsIDocument;
 class nsString;
-class nsIDocShell;
 class nsXULPrototypeDocument;
 
 class nsIObjectInputStream;
 class nsIObjectOutputStream;
 class nsIOffThreadScriptReceiver;
 class nsXULPrototypeNode;
 typedef nsTArray<nsRefPtr<nsXULPrototypeNode> > nsPrototypeArray;
 
@@ -360,18 +359,16 @@ enum {
   XUL_ELEMENT_HAS_CONTENTMENU_LISTENER =  XUL_ELEMENT_FLAG_BIT(1),
   XUL_ELEMENT_HAS_POPUP_LISTENER =        XUL_ELEMENT_FLAG_BIT(2)
 };
 
 ASSERT_NODE_FLAGS_SPACE(ELEMENT_TYPE_SPECIFIC_BITS_OFFSET + 3);
 
 #undef XUL_ELEMENT_FLAG_BIT
 
-class nsScriptEventHandlerOwnerTearoff;
-
 class nsXULElement final : public nsStyledElement,
                            public nsIDOMXULElement
 {
 public:
     explicit nsXULElement(already_AddRefed<mozilla::dom::NodeInfo> aNodeInfo);
 
     static nsresult
     Create(nsXULPrototypeElement* aPrototype, nsIDocument* aDocument,
--- a/dom/xul/templates/nsContentTestNode.h
+++ b/dom/xul/templates/nsContentTestNode.h
@@ -7,18 +7,16 @@
 #define nsContentTestNode_h__
 
 #include "mozilla/Attributes.h"
 #include "nscore.h"
 #include "nsRuleNetwork.h"
 #include "nsIAtom.h"
 #include "nsIDOMDocument.h"
 
-class nsIXULTemplateBuilder;
-
 /**
  * The nsContentTestNode is always the top node in a query's rule network. It
  * exists so that Constrain can filter out resources that aren't part of a
  * result.
  */
 class nsContentTestNode : public TestNode
 {
 public:
--- a/dom/xul/templates/nsRuleNetwork.h
+++ b/dom/xul/templates/nsRuleNetwork.h
@@ -32,17 +32,16 @@
 #include "nsCOMPtr.h"
 #include "nsCOMArray.h"
 #include "nsIAtom.h"
 #include "nsIDOMNode.h"
 #include "plhash.h"
 #include "pldhash.h"
 #include "nsIRDFNode.h"
 
-class nsIRDFResource;
 class nsXULTemplateResultSetRDF;
 class nsXULTemplateQueryProcessorRDF;
 
 //----------------------------------------------------------------------
 
 /**
  * A memory element that supports an instantiation. A memory element holds a
  * set of nodes involved in an RDF test such as <member> or <triple> test. A
--- a/dom/xul/templates/nsXULContentUtils.h
+++ b/dom/xul/templates/nsXULContentUtils.h
@@ -12,20 +12,17 @@
 #ifndef nsXULContentUtils_h__
 #define nsXULContentUtils_h__
 
 #include "nsISupports.h"
 
 class nsIAtom;
 class nsIContent;
 class nsIDocument;
-class nsIDOMNodeList;
 class nsIRDFNode;
-class nsCString;
-class nsString;
 class nsIRDFResource;
 class nsIRDFLiteral;
 class nsIRDFService;
 class nsIDateTimeFormat;
 class nsICollation;
 
 // errors to pass to LogTemplateError
 #define ERROR_TEMPLATE_INVALID_QUERYPROCESSOR                           \
--- a/dom/xul/templates/nsXULTemplateBuilder.h
+++ b/dom/xul/templates/nsXULTemplateBuilder.h
@@ -28,17 +28,16 @@
 #include "prlog.h"
 #ifdef PR_LOGGING
 extern PRLogModuleInfo* gXULTemplateLog;
 #endif
 
 class nsIContent;
 class nsIObserverService;
 class nsIRDFCompositeDataSource;
-class nsIXULDocument;
 
 /**
  * An object that translates an RDF graph into a presentation using a
  * set of rules.
  */
 class nsXULTemplateBuilder : public nsIXULTemplateBuilder,
                              public nsIObserver,
                              public nsStubDocumentObserver
--- a/dom/xul/templates/nsXULTemplateQueryProcessorRDF.h
+++ b/dom/xul/templates/nsXULTemplateQueryProcessorRDF.h
@@ -29,17 +29,16 @@
 #include "mozilla/Attributes.h"
 
 #include "prlog.h"
 #ifdef PR_LOGGING
 extern PRLogModuleInfo* gXULTemplateLog;
 #endif
 
 class nsIContent;
-class nsIRDFCompositeDataSource;
 class nsXULTemplateResultRDF;
 
 /**
  * An object that generates results from a query on an RDF graph
  */
 class nsXULTemplateQueryProcessorRDF final : public nsIXULTemplateQueryProcessor,
                                              public nsIRDFObserver
 {