diff --git a/accessible/src/base/nsCoreUtils.h b/accessible/src/base/nsCoreUtils.h index 0bb683d9e658..3a348105e051 100644 --- a/accessible/src/base/nsCoreUtils.h +++ b/accessible/src/base/nsCoreUtils.h @@ -7,6 +7,7 @@ #define nsCoreUtils_h_ #include "nsIContent.h" +#include "nsIDocument.h" #include "nsIPresShell.h" #include "nsIDOMDOMStringList.h" diff --git a/content/base/public/Element.h b/content/base/public/Element.h index 36795237aa0b..763e24dae6d2 100644 --- a/content/base/public/Element.h +++ b/content/base/public/Element.h @@ -17,6 +17,7 @@ #include "nsChangeHint.h" // for enum #include "nsEventStates.h" // for member #include "mozilla/dom/DirectionalityUtils.h" +#include "nsIDocument.h" #include "nsIDOMElement.h" #include "nsIDOMDocumentFragment.h" #include "nsILinkHandler.h" diff --git a/content/base/public/moz.build b/content/base/public/moz.build index 50bee3e689c9..59f0dc041c44 100644 --- a/content/base/public/moz.build +++ b/content/base/public/moz.build @@ -49,6 +49,7 @@ EXPORTS += [ 'nsHostObjectProtocolHandler.h', 'nsIAttribute.h', 'nsIContent.h', + 'nsIContentInlines.h', 'nsIContentIterator.h', 'nsIContentSerializer.h', 'nsIDocument.h', diff --git a/content/base/public/nsIContent.h b/content/base/public/nsIContent.h index e49ac3e3b74a..a81dd3f656e4 100644 --- a/content/base/public/nsIContent.h +++ b/content/base/public/nsIContent.h @@ -7,7 +7,7 @@ #include "mozilla/Attributes.h" #include "nsCaseTreatment.h" // for enum, cannot be forward-declared -#include "nsIDocument.h" +#include "nsINode.h" // Forward declarations class nsAString; @@ -243,10 +243,7 @@ public: * Return true iff this node is in an HTML document (in the HTML5 sense of * the term, i.e. not in an XHTML/XML document). */ - inline bool IsInHTMLDocument() const - { - return OwnerDoc()->IsHTML(); - } + inline bool IsInHTMLDocument() const; /** * Get the namespace that this element's tag is defined in diff --git a/content/base/public/nsIContentInlines.h b/content/base/public/nsIContentInlines.h new file mode 100644 index 000000000000..e4345cfce59f --- /dev/null +++ b/content/base/public/nsIContentInlines.h @@ -0,0 +1,19 @@ +/* -*- Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 8; -*- */ +/* vim: set sw=2 sts=2 ts=8 et tw=80 : */ +/* 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 nsIContentInlines_h +#define nsIContentInlines_h + +#include "nsIContent.h" +#include "nsIDocument.h" + +inline bool +nsIContent::IsInHTMLDocument() const +{ + return OwnerDoc()->IsHTML(); +} + +#endif // nsIContentInlines_h diff --git a/content/base/src/Attr.cpp b/content/base/src/Attr.cpp index 9d5a18765061..dda97e482df8 100644 --- a/content/base/src/Attr.cpp +++ b/content/base/src/Attr.cpp @@ -16,6 +16,7 @@ #include "nsError.h" #include "nsUnicharUtils.h" #include "nsDOMString.h" +#include "nsIContentInlines.h" #include "nsIDocument.h" #include "nsIDOMDocument.h" #include "nsIDOMUserDataHandler.h" diff --git a/content/base/src/Element.cpp b/content/base/src/Element.cpp index 19da6cf77fd8..4586f8a96f8c 100644 --- a/content/base/src/Element.cpp +++ b/content/base/src/Element.cpp @@ -16,6 +16,7 @@ #include "mozilla/dom/Attr.h" #include "nsDOMAttributeMap.h" #include "nsIAtom.h" +#include "nsIContentInlines.h" #include "nsINodeInfo.h" #include "nsIDocumentInlines.h" #include "nsIDOMNodeList.h" diff --git a/content/base/src/Link.h b/content/base/src/Link.h index c805a07368e8..163bf746f7cb 100644 --- a/content/base/src/Link.h +++ b/content/base/src/Link.h @@ -13,6 +13,7 @@ #include "mozilla/IHistory.h" #include "mozilla/MemoryReporting.h" +#include "nsEventStates.h" #include "nsIContent.h" namespace mozilla { diff --git a/content/base/src/nsDOMAttributeMap.cpp b/content/base/src/nsDOMAttributeMap.cpp index bd7c5472f4c0..b7a0fe7911bf 100644 --- a/content/base/src/nsDOMAttributeMap.cpp +++ b/content/base/src/nsDOMAttributeMap.cpp @@ -16,6 +16,7 @@ #include "nsAttrName.h" #include "nsContentUtils.h" #include "nsError.h" +#include "nsIContentInlines.h" #include "nsIDocument.h" #include "nsIDOMDocument.h" #include "nsINameSpaceManager.h" diff --git a/content/base/src/nsFrameLoader.cpp b/content/base/src/nsFrameLoader.cpp index 31671f9b4fe3..275931f5bdc1 100644 --- a/content/base/src/nsFrameLoader.cpp +++ b/content/base/src/nsFrameLoader.cpp @@ -19,7 +19,7 @@ #include "nsIDOMMozBrowserFrame.h" #include "nsIDOMWindow.h" #include "nsIPresShell.h" -#include "nsIContent.h" +#include "nsIContentInlines.h" #include "nsIContentViewer.h" #include "nsIDocument.h" #include "nsIDOMDocument.h" diff --git a/content/base/src/nsNodeUtils.h b/content/base/src/nsNodeUtils.h index d02d75d9e29b..e41c0d3221f5 100644 --- a/content/base/src/nsNodeUtils.h +++ b/content/base/src/nsNodeUtils.h @@ -9,6 +9,7 @@ #include "nsIContent.h" // for use in inline function (ParentChainChanged) #include "nsIMutationObserver.h" // for use in inline function (ParentChainChanged) #include "js/TypeDecls.h" +#include "nsCOMArray.h" struct CharacterDataChangeInfo; class nsIVariant; diff --git a/content/events/src/nsDOMDataTransfer.cpp b/content/events/src/nsDOMDataTransfer.cpp index cf5b263f6578..59d7239b0a91 100644 --- a/content/events/src/nsDOMDataTransfer.cpp +++ b/content/events/src/nsDOMDataTransfer.cpp @@ -22,6 +22,8 @@ #include "nsCRT.h" #include "nsIScriptObjectPrincipal.h" #include "nsIScriptContext.h" +#include "nsIDocument.h" +#include "nsIScriptGlobalObject.h" using namespace mozilla; using namespace mozilla::dom; diff --git a/content/html/content/src/nsGenericHTMLElement.cpp b/content/html/content/src/nsGenericHTMLElement.cpp index 3fb825ac8e4a..1b504e67da47 100644 --- a/content/html/content/src/nsGenericHTMLElement.cpp +++ b/content/html/content/src/nsGenericHTMLElement.cpp @@ -13,6 +13,7 @@ #include "nsAttrValueInlines.h" #include "nsCOMPtr.h" #include "nsIAtom.h" +#include "nsIContentInlines.h" #include "nsIContentViewer.h" #include "mozilla/css/StyleRule.h" #include "nsIDocument.h" diff --git a/content/media/TextTrackCue.h b/content/media/TextTrackCue.h index 8f3b8ef954a6..891e4e657bef 100644 --- a/content/media/TextTrackCue.h +++ b/content/media/TextTrackCue.h @@ -13,6 +13,7 @@ #include "nsDOMEventTargetHelper.h" #include "nsIWebVTTParserWrapper.h" #include "mozilla/StaticPtr.h" +#include "nsIDocument.h" namespace mozilla { namespace dom { diff --git a/content/svg/content/src/nsSVGFeatures.cpp b/content/svg/content/src/nsSVGFeatures.cpp index b22ad28eb59c..153a00cfdd1e 100644 --- a/content/svg/content/src/nsSVGFeatures.cpp +++ b/content/svg/content/src/nsSVGFeatures.cpp @@ -14,6 +14,7 @@ #include "nsSVGFeatures.h" #include "nsIContent.h" +#include "nsIDocument.h" #include "mozilla/Preferences.h" using namespace mozilla; diff --git a/content/xbl/src/nsBindingManager.h b/content/xbl/src/nsBindingManager.h index 099d8bb682e3..dd02b350ebdd 100644 --- a/content/xbl/src/nsBindingManager.h +++ b/content/xbl/src/nsBindingManager.h @@ -30,6 +30,7 @@ class nsXBLBinding; template class nsRefPtr; typedef nsTArray > nsBindingList; class nsIPrincipal; +class nsCSSStyleSheet; class nsBindingManager MOZ_FINAL : public nsStubMutationObserver { diff --git a/content/xslt/src/xpath/txXPathTreeWalker.h b/content/xslt/src/xpath/txXPathTreeWalker.h index 41acf1343184..8f0e9d0a817b 100644 --- a/content/xslt/src/xpath/txXPathTreeWalker.h +++ b/content/xslt/src/xpath/txXPathTreeWalker.h @@ -8,6 +8,7 @@ #include "txCore.h" #include "txXPathNode.h" +#include "nsIContentInlines.h" #include "nsINodeInfo.h" #include "nsTArray.h" diff --git a/content/xul/content/src/nsXULContextMenuBuilder.cpp b/content/xul/content/src/nsXULContextMenuBuilder.cpp index 6317e5fb3b56..6e342aac3fb9 100644 --- a/content/xul/content/src/nsXULContextMenuBuilder.cpp +++ b/content/xul/content/src/nsXULContextMenuBuilder.cpp @@ -9,6 +9,7 @@ #include "nsIDOMHTMLElement.h" #include "nsIDOMHTMLMenuItemElement.h" #include "nsXULContextMenuBuilder.h" +#include "nsIDocument.h" using namespace mozilla; using namespace mozilla::dom; diff --git a/content/xul/templates/src/nsXULTemplateQueryProcessorRDF.cpp b/content/xul/templates/src/nsXULTemplateQueryProcessorRDF.cpp index 9207f55a0f05..3909840aebad 100644 --- a/content/xul/templates/src/nsXULTemplateQueryProcessorRDF.cpp +++ b/content/xul/templates/src/nsXULTemplateQueryProcessorRDF.cpp @@ -33,6 +33,7 @@ #include "nsXULTemplateResultSetRDF.h" #include "nsXULTemplateQueryProcessorRDF.h" #include "nsXULSortService.h" +#include "nsIDocument.h" //---------------------------------------------------------------------- diff --git a/content/xul/templates/src/nsXULTemplateQueryProcessorStorage.cpp b/content/xul/templates/src/nsXULTemplateQueryProcessorStorage.cpp index 08467cac9223..6cfad39b57f6 100644 --- a/content/xul/templates/src/nsXULTemplateQueryProcessorStorage.cpp +++ b/content/xul/templates/src/nsXULTemplateQueryProcessorStorage.cpp @@ -25,6 +25,8 @@ #include "nsXULSortService.h" #include "mozIStorageService.h" +#include "nsIChannel.h" +#include "nsIDocument.h" //---------------------------------------------------------------------- // diff --git a/dom/plugins/base/nsPluginInstanceOwner.cpp b/dom/plugins/base/nsPluginInstanceOwner.cpp index 9666a75720c2..6a679b4150b8 100644 --- a/dom/plugins/base/nsPluginInstanceOwner.cpp +++ b/dom/plugins/base/nsPluginInstanceOwner.cpp @@ -59,6 +59,7 @@ using mozilla::DefaultXDisplay; #include "ImageContainer.h" #include "nsIDOMHTMLCollection.h" #include "GLContext.h" +#include "nsIContentInlines.h" #include "mozilla/MiscEvents.h" #include "mozilla/MouseEvents.h" #include "mozilla/TextEvents.h" diff --git a/layout/base/nsCSSFrameConstructor.h b/layout/base/nsCSSFrameConstructor.h index 2332a983384b..930cc2c9e201 100644 --- a/layout/base/nsCSSFrameConstructor.h +++ b/layout/base/nsCSSFrameConstructor.h @@ -20,6 +20,7 @@ #include "nsCSSPseudoElements.h" #include "nsIAnonymousContentCreator.h" #include "nsFrameManager.h" +#include "nsIDocument.h" struct nsFrameItems; struct nsAbsoluteItems; diff --git a/layout/style/nsStyleStruct.cpp b/layout/style/nsStyleStruct.cpp index 5bf8fb0a310a..52719046caa6 100644 --- a/layout/style/nsStyleStruct.cpp +++ b/layout/style/nsStyleStruct.cpp @@ -28,6 +28,7 @@ #include "mozilla/Likely.h" #include "nsIURI.h" +#include "nsIDocument.h" #include static_assert((((1 << nsStyleStructID_Length) - 1) & diff --git a/layout/xul/base/public/nsXULPopupManager.h b/layout/xul/base/public/nsXULPopupManager.h index 56739e81d009..db6485652d40 100644 --- a/layout/xul/base/public/nsXULPopupManager.h +++ b/layout/xul/base/public/nsXULPopupManager.h @@ -51,6 +51,7 @@ class nsMenuBarFrame; class nsMenuParent; class nsIDOMKeyEvent; class nsIDocShellTreeItem; +class nsPIDOMWindow; // when a menu command is executed, the closemenu attribute may be used // to define how the menu should be closed up diff --git a/parser/html/nsHtml5SVGLoadDispatcher.cpp b/parser/html/nsHtml5SVGLoadDispatcher.cpp index 1a9186616010..07fa7b9e1056 100644 --- a/parser/html/nsHtml5SVGLoadDispatcher.cpp +++ b/parser/html/nsHtml5SVGLoadDispatcher.cpp @@ -7,6 +7,7 @@ #include "nsEventDispatcher.h" #include "nsIPresShell.h" #include "mozilla/BasicEvents.h" +#include "nsIDocument.h" using namespace mozilla; diff --git a/widget/cocoa/nsCocoaUtils.mm b/widget/cocoa/nsCocoaUtils.mm index c8696026cf9a..2ea2d1653e04 100644 --- a/widget/cocoa/nsCocoaUtils.mm +++ b/widget/cocoa/nsCocoaUtils.mm @@ -16,6 +16,7 @@ #include "nsIServiceManager.h" #include "nsMenuUtilsX.h" #include "nsToolkit.h" +#include "nsCRT.h" #include "mozilla/MiscEvents.h" #include "mozilla/Preferences.h" #include "mozilla/TextEvents.h"