--- a/accessible/src/base/StyleInfo.cpp
+++ b/accessible/src/base/StyleInfo.cpp
@@ -3,16 +3,17 @@
/* 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/. */
#include "StyleInfo.h"
#include "mozilla/dom/Element.h"
#include "nsComputedDOMStyle.h"
+#include "nsCSSProps.h"
#include "nsIFrame.h"
using namespace mozilla;
using namespace mozilla::a11y;
StyleInfo::StyleInfo(dom::Element* aElement, nsIPresShell* aPresShell) :
mElement(aElement)
{
--- a/content/smil/nsSMILCSSProperty.cpp
+++ b/content/smil/nsSMILCSSProperty.cpp
@@ -4,16 +4,17 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* representation of a SMIL-animatable CSS property on an element */
#include "nsSMILCSSProperty.h"
#include "nsSMILCSSValueType.h"
#include "nsSMILValue.h"
#include "nsComputedDOMStyle.h"
+#include "nsCSSProps.h"
#include "nsStyleAnimation.h"
#include "mozilla/dom/Element.h"
#include "nsIDOMElement.h"
using namespace mozilla::dom;
// Helper function
static bool
--- a/layout/base/nsLayoutUtils.cpp
+++ b/layout/base/nsLayoutUtils.cpp
@@ -73,16 +73,17 @@
#include "nsFontFaceList.h"
#include "nsFontInflationData.h"
#include "nsSVGUtils.h"
#include "nsSVGIntegrationUtils.h"
#include "nsSVGForeignObjectFrame.h"
#include "nsSVGOuterSVGFrame.h"
#include "nsSVGTextFrame2.h"
#include "nsStyleStructInlines.h"
+#include "nsStyleTransformMatrix.h"
#include "mozilla/dom/PBrowserChild.h"
#include "mozilla/dom/TabChild.h"
#include "mozilla/Preferences.h"
#ifdef MOZ_XUL
#include "nsXULPopupManager.h"
#endif
--- a/layout/generic/TextOverflow.cpp
+++ b/layout/generic/TextOverflow.cpp
@@ -6,16 +6,17 @@
#include "TextOverflow.h"
#include <algorithm>
// Please maintain alphabetical order below
#include "nsBlockFrame.h"
#include "nsCaret.h"
#include "nsContentUtils.h"
+#include "nsCSSAnonBoxes.h"
#include "nsGfxScrollFrame.h"
#include "nsIScrollableFrame.h"
#include "nsLayoutUtils.h"
#include "nsPresContext.h"
#include "nsRect.h"
#include "nsRenderingContext.h"
#include "nsTextFrame.h"
#include "nsStyleStructInlines.h"
--- a/layout/generic/nsFlexContainerFrame.cpp
+++ b/layout/generic/nsFlexContainerFrame.cpp
@@ -4,16 +4,17 @@
/* This Source Code is subject to the terms of the Mozilla Public License
* version 2.0 (the "License"). You can obtain a copy of the License at
* http://mozilla.org/MPL/2.0/. */
/* rendering object for CSS "display: flex" */
#include "nsFlexContainerFrame.h"
#include "nsContentUtils.h"
+#include "nsCSSAnonBoxes.h"
#include "nsDisplayList.h"
#include "nsLayoutUtils.h"
#include "nsPresContext.h"
#include "nsStyleContext.h"
#include "prlog.h"
#include <algorithm>
using namespace mozilla::css;
--- a/layout/style/AnimationCommon.cpp
+++ b/layout/style/AnimationCommon.cpp
@@ -5,17 +5,16 @@
#include "gfxPlatform.h"
#include "AnimationCommon.h"
#include "nsRuleData.h"
#include "nsCSSFrameConstructor.h"
#include "nsCSSValue.h"
#include "nsStyleContext.h"
#include "nsIFrame.h"
-#include "nsAnimationManager.h"
#include "nsLayoutUtils.h"
#include "mozilla/LookAndFeel.h"
#include "Layers.h"
#include "FrameLayerBuilder.h"
#include "nsDisplayList.h"
#include "mozilla/Preferences.h"
using namespace mozilla::layers;
--- a/layout/style/CSS.cpp
+++ b/layout/style/CSS.cpp
@@ -5,19 +5,17 @@
/* DOM object holding utility CSS functions */
#include "CSS.h"
#include "mozilla/dom/BindingDeclarations.h"
#include "nsCSSParser.h"
#include "nsGlobalWindow.h"
-#include "nsIDOMDocument.h"
#include "nsIDocument.h"
-#include "nsIPrincipal.h"
#include "nsIURI.h"
namespace mozilla {
namespace dom {
struct SupportsParsingInfo
{
nsIURI* mDocURI;
--- a/layout/style/CSS.h
+++ b/layout/style/CSS.h
@@ -4,20 +4,22 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* DOM object holding utility CSS functions */
#ifndef mozilla_dom_CSS_h_
#define mozilla_dom_CSS_h_
#include "mozilla/Attributes.h"
-#include "mozilla/ErrorResult.h"
#include "mozilla/Preferences.h"
namespace mozilla {
+
+class ErrorResult;
+
namespace dom {
class GlobalObject;
class CSS {
private:
CSS() MOZ_DELETE;
--- a/layout/style/ErrorReporter.cpp
+++ b/layout/style/ErrorReporter.cpp
@@ -10,18 +10,18 @@
#include "mozilla/Preferences.h"
#include "mozilla/Services.h"
#include "nsCSSScanner.h"
#include "nsCSSStyleSheet.h"
#include "nsIConsoleService.h"
#include "nsIDocument.h"
#include "nsIFactory.h"
#include "nsIScriptError.h"
-#include "nsIServiceManager.h"
#include "nsIStringBundle.h"
+#include "nsServiceManagerUtils.h"
#include "nsStyleUtil.h"
#include "nsThreadUtils.h"
#ifdef CSS_REPORT_PARSE_ERRORS
using mozilla::Preferences;
namespace services = mozilla::services;
--- a/layout/style/ImageLoader.h
+++ b/layout/style/ImageLoader.h
@@ -1,19 +1,17 @@
/* 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/. */
// A class that handles style system image loads (other image loads are handled
// by the nodes in the content tree).
-#include "nsAutoPtr.h"
#include "nsClassHashtable.h"
#include "nsHashKeys.h"
-#include "nsInterfaceHashtable.h"
#include "nsCSSValue.h"
#include "imgIRequest.h"
#include "imgIOnloadBlocker.h"
#include "imgINotificationObserver.h"
#include "mozilla/Attributes.h"
class nsIFrame;
class nsIDocument;
--- a/layout/style/Loader.cpp
+++ b/layout/style/Loader.cpp
@@ -13,60 +13,51 @@
* Date Modified by Description of modification
* 04/20/2000 IBM Corp. OS/2 VisualAge build.
*/
/* loading of CSS style sheets using the network APIs */
#include "mozilla/Util.h"
-#include "mozilla/dom/Element.h"
#include "mozilla/css/Loader.h"
#include "nsIRunnable.h"
#include "nsIUnicharStreamLoader.h"
#include "nsSyncLoadService.h"
#include "nsCOMPtr.h"
-#include "nsCOMArray.h"
#include "nsString.h"
#include "nsIContent.h"
#include "nsIDocument.h"
#include "nsIDOMNode.h"
#include "nsIDOMDocument.h"
-#include "nsIDOMWindow.h"
-#include "nsHashtable.h"
#include "nsIURI.h"
-#include "nsIServiceManager.h"
#include "nsNetUtil.h"
#include "nsContentUtils.h"
-#include "nsCRT.h"
#include "nsIScriptSecurityManager.h"
#include "nsContentPolicyUtils.h"
#include "nsIHttpChannel.h"
#include "nsIHttpChannelInternal.h"
#include "nsIScriptError.h"
#include "nsMimeTypes.h"
-#include "nsIAtom.h"
#include "nsCSSStyleSheet.h"
#include "nsIStyleSheetLinkingElement.h"
#include "nsICSSLoaderObserver.h"
#include "nsCSSParser.h"
#include "mozilla/css/ImportRule.h"
#include "nsThreadUtils.h"
#include "nsGkAtoms.h"
-#include "nsDocShellCID.h"
#include "nsIThreadInternal.h"
#include "nsCrossSiteListenerProxy.h"
#ifdef MOZ_XUL
#include "nsXULPrototypeCache.h"
#endif
#include "nsIMediaList.h"
#include "nsIDOMStyleSheet.h"
-#include "nsIDOMCSSStyleSheet.h"
#include "nsError.h"
#include "nsIChannelPolicy.h"
#include "nsIContentSecurityPolicy.h"
#include "nsCycleCollectionParticipant.h"
#include "mozilla/dom/EncodingUtils.h"
using mozilla::dom::EncodingUtils;
--- a/layout/style/StyleRule.cpp
+++ b/layout/style/StyleRule.cpp
@@ -8,44 +8,35 @@
* selectors, and DOM objects for style rules, selectors, and
* declarations
*/
#include "mozilla/css/StyleRule.h"
#include "mozilla/css/GroupRule.h"
#include "mozilla/css/Declaration.h"
#include "nsCSSStyleSheet.h"
-#include "mozilla/css/Loader.h"
-#include "nsIURL.h"
#include "nsIDocument.h"
#include "nsIAtom.h"
-#include "nsCRT.h"
#include "nsString.h"
-#include "nsStyleConsts.h"
#include "nsStyleUtil.h"
-#include "nsIDOMCSSStyleSheet.h"
#include "nsICSSStyleRuleDOMWrapper.h"
-#include "nsIDOMCSSStyleDeclaration.h"
#include "nsDOMCSSDeclaration.h"
#include "nsINameSpaceManager.h"
#include "nsXMLNameSpaceMap.h"
-#include "nsRuleNode.h"
-#include "nsUnicharUtils.h"
#include "nsCSSPseudoElements.h"
-#include "nsIPrincipal.h"
-#include "nsComponentManagerUtils.h"
#include "nsCSSPseudoClasses.h"
#include "nsCSSAnonBoxes.h"
#include "nsTArray.h"
#include "nsDOMClassInfoID.h"
#include "nsContentUtils.h"
#include "nsError.h"
#include "mozAutoDocUpdate.h"
-#include "prlog.h"
+class nsIDOMCSSStyleDeclaration;
+class nsIDOMCSSStyleSheet;
namespace css = mozilla::css;
#define NS_IF_CLONE(member_) \
PR_BEGIN_MACRO \
if (member_) { \
result->member_ = member_->Clone(); \
if (!result->member_) { \
--- a/layout/style/nsCSSAnonBoxes.cpp
+++ b/layout/style/nsCSSAnonBoxes.cpp
@@ -5,18 +5,16 @@
/* atom list for CSS anonymous boxes */
#include "mozilla/Util.h"
#include "nsCSSAnonBoxes.h"
#include "nsAtomListUtils.h"
#include "nsStaticAtom.h"
-#include "nsMemory.h"
-#include "nsCRT.h"
using namespace mozilla;
// define storage for all atoms
#define CSS_ANON_BOX(_name, _value) \
nsICSSAnonBoxPseudo* nsCSSAnonBoxes::_name;
#include "nsCSSAnonBoxList.h"
#undef CSS_ANON_BOX
--- a/layout/style/nsCSSKeywords.cpp
+++ b/layout/style/nsCSSKeywords.cpp
@@ -4,17 +4,16 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* keywords used within CSS property values */
#include "nsCSSKeywords.h"
#include "nsString.h"
#include "nsStaticNameTable.h"
#include "nsReadableUtils.h"
-#include "nsStyleConsts.h"
// required to make the symbol external, so that TestCSSPropertyLookup.cpp can link with it
extern const char* const kCSSRawKeywords[];
// define an array of all CSS keywords
#define CSS_KEY(_name,_id) #_name,
const char* const kCSSRawKeywords[] = {
#include "nsCSSKeywordList.h"
--- a/layout/style/nsCSSParser.cpp
+++ b/layout/style/nsCSSParser.cpp
@@ -17,41 +17,33 @@
#include "mozilla/css/StyleRule.h"
#include "mozilla/css/ImportRule.h"
#include "nsCSSRules.h"
#include "mozilla/css/NameSpaceRule.h"
#include "nsTArray.h"
#include "nsCSSStyleSheet.h"
#include "mozilla/css/Declaration.h"
#include "nsStyleConsts.h"
-#include "nsIURL.h"
#include "nsNetUtil.h"
#include "nsCOMPtr.h"
#include "nsString.h"
#include "nsReadableUtils.h"
-#include "nsUnicharUtils.h"
#include "nsIAtom.h"
-#include "nsCOMArray.h"
#include "nsColor.h"
#include "nsCSSPseudoClasses.h"
#include "nsCSSPseudoElements.h"
-#include "nsCSSAnonBoxes.h"
#include "nsINameSpaceManager.h"
#include "nsXMLNameSpaceMap.h"
-#include "nsThemeConstants.h"
#include "nsError.h"
#include "nsIMediaList.h"
-#include "mozilla/LookAndFeel.h"
#include "nsStyleUtil.h"
#include "nsIPrincipal.h"
#include "prprf.h"
-#include "math.h"
#include "nsContentUtils.h"
#include "nsAutoPtr.h"
-#include "prlog.h"
#include "CSSCalc.h"
#include "nsMediaFeatures.h"
#include "nsLayoutUtils.h"
using namespace mozilla;
// Flags for ParseVariant method
#define VARIANT_KEYWORD 0x000001 // K
--- a/layout/style/nsCSSParser.h
+++ b/layout/style/nsCSSParser.h
@@ -5,22 +5,20 @@
/* parsing of CSS stylesheets, based on a token stream from the CSS scanner */
#ifndef nsCSSParser_h___
#define nsCSSParser_h___
#include "mozilla/Attributes.h"
-#include "nsAString.h"
#include "nsCSSProperty.h"
-#include "nsColor.h"
-#include "nsCOMArray.h"
#include "nsCOMPtr.h"
-#include "nsTArray.h"
+#include "nsStringFwd.h"
+#include "nsTArrayForwardDeclare.h"
class nsCSSStyleSheet;
class nsIPrincipal;
class nsIURI;
struct nsCSSSelectorList;
class nsMediaList;
class nsCSSKeyframeRule;
class nsCSSValue;
--- a/layout/style/nsCSSPseudoClasses.cpp
+++ b/layout/style/nsCSSPseudoClasses.cpp
@@ -3,19 +3,17 @@
* 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/. */
/* atom list for CSS pseudo-classes */
#include "mozilla/Util.h"
#include "nsCSSPseudoClasses.h"
-#include "nsAtomListUtils.h"
#include "nsStaticAtom.h"
-#include "nsMemory.h"
#include "mozilla/Preferences.h"
using namespace mozilla;
// define storage for all atoms
#define CSS_PSEUDO_CLASS(_name, _value, _pref) \
static nsIAtom* sPseudoClass_##_name;
#include "nsCSSPseudoClassList.h"
--- a/layout/style/nsCSSPseudoClasses.h
+++ b/layout/style/nsCSSPseudoClasses.h
@@ -3,17 +3,19 @@
* 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/. */
/* atom list for CSS pseudo-classes */
#ifndef nsCSSPseudoClasses_h___
#define nsCSSPseudoClasses_h___
-#include "nsIAtom.h"
+#include "nsString.h"
+
+class nsIAtom;
class nsCSSPseudoClasses {
public:
static void AddRefAtoms();
enum Type {
#define CSS_PSEUDO_CLASS(_name, _value, _pref) \
--- a/layout/style/nsCSSPseudoElements.cpp
+++ b/layout/style/nsCSSPseudoElements.cpp
@@ -5,17 +5,16 @@
/* atom list for CSS pseudo-elements */
#include "mozilla/Util.h"
#include "nsCSSPseudoElements.h"
#include "nsAtomListUtils.h"
#include "nsStaticAtom.h"
-#include "nsMemory.h"
#include "nsCSSAnonBoxes.h"
using namespace mozilla;
// define storage for all atoms
#define CSS_PSEUDO_ELEMENT(name_, value_, flags_) \
nsICSSPseudoElement* nsCSSPseudoElements::name_;
#include "nsCSSPseudoElementList.h"
--- a/layout/style/nsCSSRules.cpp
+++ b/layout/style/nsCSSRules.cpp
@@ -9,31 +9,28 @@
#include "nsCSSRules.h"
#include "nsCSSValue.h"
#include "mozilla/css/ImportRule.h"
#include "mozilla/css/NameSpaceRule.h"
#include "nsString.h"
#include "nsIAtom.h"
-#include "nsIURL.h"
#include "nsCSSProps.h"
#include "nsCSSStyleSheet.h"
#include "nsCOMPtr.h"
#include "nsIDOMCSSStyleSheet.h"
#include "nsIMediaList.h"
#include "nsICSSRuleList.h"
#include "nsIDocument.h"
#include "nsPresContext.h"
-#include "nsRuleNode.h"
#include "nsContentUtils.h"
-#include "nsStyleConsts.h"
#include "nsError.h"
#include "nsStyleUtil.h"
#include "mozilla/css/Declaration.h"
#include "nsCSSParser.h"
#include "nsPrintfCString.h"
#include "nsDOMClassInfoID.h"
#include "mozilla/dom/CSSStyleDeclarationBinding.h"
#include "StyleRule.h"
--- a/layout/style/nsCSSRules.h
+++ b/layout/style/nsCSSRules.h
@@ -7,41 +7,42 @@
/* rules in a CSS stylesheet other than style rules (e.g., @import rules) */
#ifndef nsCSSRules_h_
#define nsCSSRules_h_
#include "mozilla/Attributes.h"
#include "mozilla/css/GroupRule.h"
-#include "mozilla/ErrorResult.h"
#include "mozilla/Preferences.h"
#include "nsIDOMCSSConditionRule.h"
#include "nsIDOMCSSFontFaceRule.h"
#include "nsIDOMCSSGroupingRule.h"
#include "nsIDOMCSSMediaRule.h"
#include "nsIDOMCSSMozDocumentRule.h"
#include "nsIDOMCSSSupportsRule.h"
#include "nsIDOMMozCSSKeyframeRule.h"
#include "nsIDOMMozCSSKeyframesRule.h"
#include "nsIDOMCSSStyleDeclaration.h"
-#include "nsICSSRuleList.h"
#include "nsAutoPtr.h"
#include "nsCSSProperty.h"
#include "nsCSSValue.h"
#include "nsIDOMCSSCharsetRule.h"
#include "nsTArray.h"
#include "nsDOMCSSDeclaration.h"
#include "Declaration.h"
#include "nsIDOMCSSPageRule.h"
#include "StyleRule.h"
class nsMediaList;
namespace mozilla {
+
+class ErrorResult;
+
namespace css {
class MediaRule MOZ_FINAL : public GroupRule,
public nsIDOMCSSMediaRule
{
public:
MediaRule();
private:
--- a/layout/style/nsCSSScanner.cpp
+++ b/layout/style/nsCSSScanner.cpp
@@ -1,18 +1,16 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* 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/. */
/* tokenization of CSS style sheets */
-#include <math.h> // must be first due to symbol conflicts
-
#include "nsCSSScanner.h"
#include "nsStyleUtil.h"
#include "mozilla/css/ErrorReporter.h"
#include "mozilla/Likely.h"
#include "mozilla/Util.h"
#include <algorithm>
using mozilla::ArrayLength;
--- a/layout/style/nsCSSStyleSheet.cpp
+++ b/layout/style/nsCSSStyleSheet.cpp
@@ -3,17 +3,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/. */
/* representation of a CSS style sheet */
#include "nsCSSStyleSheet.h"
-#include "nsCRT.h"
#include "nsIAtom.h"
#include "nsCSSRuleProcessor.h"
#include "mozilla/dom/Element.h"
#include "mozilla/css/NameSpaceRule.h"
#include "mozilla/css/GroupRule.h"
#include "mozilla/css/ImportRule.h"
#include "nsIMediaList.h"
#include "nsIDocument.h"
@@ -30,17 +29,16 @@
#include "mozilla/css/Loader.h"
#include "nsICSSLoaderObserver.h"
#include "nsINameSpaceManager.h"
#include "nsXMLNameSpaceMap.h"
#include "nsCOMPtr.h"
#include "nsContentUtils.h"
#include "nsIScriptSecurityManager.h"
#include "mozAutoDocUpdate.h"
-#include "mozilla/css/Declaration.h"
#include "nsRuleNode.h"
#include "nsMediaFeatures.h"
#include "nsDOMClassInfoID.h"
#include "mozilla/Likely.h"
using namespace mozilla;
using namespace mozilla::dom;
--- a/layout/style/nsCSSStyleSheet.h
+++ b/layout/style/nsCSSStyleSheet.h
@@ -89,17 +89,16 @@ private:
};
// -------------------------------
// CSS Style Sheet
//
class CSSRuleListImpl;
-struct ChildSheetListBuilder;
// CID for the nsCSSStyleSheet class
// ca926f30-2a7e-477e-8467-803fb32af20a
#define NS_CSS_STYLE_SHEET_IMPL_CID \
{ 0xca926f30, 0x2a7e, 0x477e, \
{ 0x84, 0x67, 0x80, 0x3f, 0xb3, 0x2a, 0xf2, 0x0a } }
--- a/layout/style/nsComputedDOMStyle.cpp
+++ b/layout/style/nsComputedDOMStyle.cpp
@@ -7,50 +7,46 @@
/* DOM object returned from element.getComputedStyle() */
#include "mozilla/Util.h"
#include "nsComputedDOMStyle.h"
#include "nsError.h"
#include "nsDOMString.h"
-#include "nsIDOMElement.h"
#include "nsIDOMCSSPrimitiveValue.h"
#include "nsStyleContext.h"
#include "nsIScrollableFrame.h"
#include "nsContentUtils.h"
-#include "prprf.h"
+#include "nsIContent.h"
#include "nsCSSProps.h"
-#include "nsCSSKeywords.h"
#include "nsDOMCSSRect.h"
+#include "nsDOMCSSRGBColor.h"
#include "nsDOMCSSValueList.h"
#include "nsFlexContainerFrame.h"
#include "nsGkAtoms.h"
#include "nsHTMLReflowState.h"
-#include "nsThemeConstants.h"
#include "nsStyleUtil.h"
#include "nsStyleStructInlines.h"
#include "nsROCSSPrimitiveValue.h"
#include "nsPresContext.h"
#include "nsIDocument.h"
#include "nsCSSPseudoElements.h"
#include "nsStyleSet.h"
#include "imgIRequest.h"
#include "nsLayoutUtils.h"
-#include "nsFrameManager.h"
-#include "prlog.h"
#include "nsCSSKeywords.h"
#include "nsStyleCoord.h"
#include "nsDisplayList.h"
#include "nsDOMCSSDeclaration.h"
+#include "nsStyleTransformMatrix.h"
#include "mozilla/dom/Element.h"
-#include "CSSCalc.h"
#include "nsWrapperCacheInlines.h"
#include <algorithm>
using namespace mozilla;
using namespace mozilla::dom;
#if defined(DEBUG_bzbarsky) || defined(DEBUG_caillon)
#define DEBUG_ComputedDOMStyle
--- a/layout/style/nsComputedDOMStyle.h
+++ b/layout/style/nsComputedDOMStyle.h
@@ -3,33 +3,37 @@
* 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/. */
/* DOM object returned from element.getComputedStyle() */
#ifndef nsComputedDOMStyle_h__
#define nsComputedDOMStyle_h__
+#include "nsAutoPtr.h"
#include "mozilla/Attributes.h"
+#include "nsCOMPtr.h"
+#include "nscore.h"
+#include "nsCSSProperty.h"
#include "nsDOMCSSDeclaration.h"
-
-#include "nsDOMCSSRGBColor.h"
-#include "nsCSSProps.h"
+#include "nsStyleContext.h"
+#include "nsStyleStruct.h"
+#include "nsIWeakReferenceUtils.h"
-#include "nsIContent.h"
-#include "nsCOMPtr.h"
-#include "nsWeakReference.h"
-#include "nsAutoPtr.h"
-#include "nsStyleStruct.h"
-#include "nsStyleContext.h"
+namespace mozilla {
+namespace dom {
+class Element;
+}
+}
class nsIFrame;
class nsIPresShell;
class nsDOMCSSValueList;
class nsROCSSPrimitiveValue;
+class nsStyleContext;
class nsComputedDOMStyle MOZ_FINAL : public nsDOMCSSDeclaration
{
public:
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_SKIPPABLE_SCRIPT_HOLDER_CLASS_AMBIGUOUS(nsComputedDOMStyle,
nsICSSDeclaration)
--- a/layout/style/nsDOMCSSAttrDeclaration.cpp
+++ b/layout/style/nsDOMCSSAttrDeclaration.cpp
@@ -3,25 +3,22 @@
* 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/. */
/* DOM object for element.style */
#include "nsDOMCSSAttrDeclaration.h"
#include "mozilla/css/Declaration.h"
-#include "mozilla/css/Loader.h"
#include "mozilla/css/StyleRule.h"
#include "mozilla/dom/Element.h"
#include "nsIDocument.h"
#include "nsIDOMMutationEvent.h"
-#include "nsIPrincipal.h"
#include "nsIURI.h"
#include "nsNodeUtils.h"
-#include "nsContentUtils.h"
#include "xpcpublic.h"
#include "nsWrapperCacheInlines.h"
namespace css = mozilla::css;
namespace dom = mozilla::dom;
nsDOMCSSAttributeDeclaration::nsDOMCSSAttributeDeclaration(dom::Element* aElement,
bool aIsSMILOverride)
--- a/layout/style/nsDOMCSSAttrDeclaration.h
+++ b/layout/style/nsDOMCSSAttrDeclaration.h
@@ -7,23 +7,18 @@
#ifndef nsDOMCSSAttributeDeclaration_h
#define nsDOMCSSAttributeDeclaration_h
#include "mozilla/Attributes.h"
#include "nsDOMCSSDeclaration.h"
#include "nsAutoPtr.h"
-#include "nsString.h"
namespace mozilla {
-namespace css {
-class Loader;
-}
-
namespace dom {
class Element;
}
}
class nsDOMCSSAttributeDeclaration MOZ_FINAL : public nsDOMCSSDeclaration
{
public:
--- a/layout/style/nsDOMCSSDeclaration.cpp
+++ b/layout/style/nsDOMCSSDeclaration.cpp
@@ -1,28 +1,22 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* 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/. */
/* base class for DOM objects for element.style and cssStyleRule.style */
#include "nsDOMCSSDeclaration.h"
-#include "nsIDOMCSSRule.h"
#include "nsCSSParser.h"
-#include "mozilla/css/Loader.h"
#include "nsCSSStyleSheet.h"
-#include "nsIStyleRule.h"
#include "mozilla/css/Rule.h"
#include "mozilla/css/Declaration.h"
#include "nsCSSProps.h"
#include "nsCOMPtr.h"
-#include "nsIURL.h"
-#include "nsReadableUtils.h"
-#include "nsIPrincipal.h"
#include "mozAutoDocUpdate.h"
using namespace mozilla;
nsDOMCSSDeclaration::~nsDOMCSSDeclaration()
{
}
--- a/layout/style/nsDOMCSSDeclaration.h
+++ b/layout/style/nsDOMCSSDeclaration.h
@@ -8,18 +8,16 @@
#ifndef nsDOMCSSDeclaration_h___
#define nsDOMCSSDeclaration_h___
#include "mozilla/Attributes.h"
#include "nsICSSDeclaration.h"
#include "nsCOMPtr.h"
#include "mozilla/dom/CSS2PropertiesBinding.h"
-class nsCSSParser;
-class nsIURI;
class nsIPrincipal;
class nsIDocument;
namespace mozilla {
namespace css {
class Declaration;
class Loader;
class Rule;
--- a/layout/style/nsDOMCSSRGBColor.cpp
+++ b/layout/style/nsDOMCSSRGBColor.cpp
@@ -1,19 +1,18 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* 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/. */
/* DOM object representing color values in DOM computed style */
#include "nsDOMCSSRGBColor.h"
+#include "nsContentUtils.h"
#include "mozilla/dom/RGBColorBinding.h"
-#include "nsIDOMCSSPrimitiveValue.h"
-#include "nsContentUtils.h"
#include "nsROCSSPrimitiveValue.h"
using namespace mozilla;
nsDOMCSSRGBColor::nsDOMCSSRGBColor(nsROCSSPrimitiveValue* aRed,
nsROCSSPrimitiveValue* aGreen,
nsROCSSPrimitiveValue* aBlue,
nsROCSSPrimitiveValue* aAlpha,
--- a/layout/style/nsDOMCSSRect.cpp
+++ b/layout/style/nsDOMCSSRect.cpp
@@ -1,21 +1,19 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* 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/. */
/* DOM object representing rectangle values in DOM computed style */
#include "mozilla/dom/RectBinding.h"
-#include "nsISupports.h"
-#include "nsCOMPtr.h"
#include "nsROCSSPrimitiveValue.h"
+#include "nsContentUtils.h"
#include "nsDOMCSSRect.h"
-#include "nsContentUtils.h"
#include "nsDOMClassInfoID.h"
using namespace mozilla;
nsDOMCSSRect::nsDOMCSSRect(nsROCSSPrimitiveValue* aTop,
nsROCSSPrimitiveValue* aRight,
nsROCSSPrimitiveValue* aBottom,
nsROCSSPrimitiveValue* aLeft)
--- a/layout/style/nsDOMCSSRect.h
+++ b/layout/style/nsDOMCSSRect.h
@@ -4,17 +4,17 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* DOM object representing rectangle values in DOM computed style */
#ifndef nsDOMCSSRect_h_
#define nsDOMCSSRect_h_
#include "mozilla/Attributes.h"
-#include "nsISupports.h"
+#include "nsISupportsImpl.h"
#include "nsIDOMRect.h"
#include "nsAutoPtr.h"
#include "nsCycleCollectionParticipant.h"
#include "nsWrapperCache.h"
class nsROCSSPrimitiveValue;
class nsDOMCSSRect : public nsIDOMRect,
--- a/layout/style/nsDOMCSSValueList.cpp
+++ b/layout/style/nsDOMCSSValueList.cpp
@@ -1,19 +1,17 @@
/* 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/. */
/* DOM object representing lists of values in DOM computed style */
+#include "nsContentUtils.h"
#include "nsDOMCSSValueList.h"
-#include "nsCOMPtr.h"
#include "mozilla/dom/CSSValueListBinding.h"
-#include "nsError.h"
-#include "nsContentUtils.h"
using namespace mozilla;
nsDOMCSSValueList::nsDOMCSSValueList(bool aCommaDelimited, bool aReadonly)
: CSSValue(), mCommaDelimited(aCommaDelimited), mReadonly(aReadonly)
{
SetIsDOMBinding();
}
--- a/layout/style/nsDOMCSSValueList.h
+++ b/layout/style/nsDOMCSSValueList.h
@@ -4,21 +4,18 @@
/* DOM object representing lists of values in DOM computed style */
#ifndef nsDOMCSSValueList_h___
#define nsDOMCSSValueList_h___
#include "nsIDOMCSSValueList.h"
#include "CSSValue.h"
-#include "nsAutoPtr.h"
#include "nsTArray.h"
-class nsComputedDOMStyle;
-
class nsDOMCSSValueList MOZ_FINAL : public mozilla::dom::CSSValue,
public nsIDOMCSSValueList
{
public:
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_AMBIGUOUS(nsDOMCSSValueList, mozilla::dom::CSSValue)
// nsIDOMCSSValue
--- a/layout/style/nsFontFaceLoader.cpp
+++ b/layout/style/nsFontFaceLoader.cpp
@@ -9,36 +9,29 @@
#ifdef MOZ_LOGGING
#define FORCE_PR_LOG /* Allow logging in the release build */
#endif /* MOZ_LOGGING */
#include "prlog.h"
#include "nsFontFaceLoader.h"
#include "nsError.h"
-#include "nsIFile.h"
-#include "nsIStreamListener.h"
#include "nsNetUtil.h"
-#include "nsIChannelEventSink.h"
-#include "nsIInterfaceRequestor.h"
#include "nsContentUtils.h"
#include "mozilla/Preferences.h"
#include "nsPresContext.h"
#include "nsIPresShell.h"
#include "nsIPrincipal.h"
#include "nsIScriptSecurityManager.h"
-#include "nsDirectoryServiceUtils.h"
-#include "nsDirectoryServiceDefs.h"
#include "nsIContentPolicy.h"
#include "nsContentPolicyUtils.h"
#include "nsCrossSiteListenerProxy.h"
#include "nsIContentSecurityPolicy.h"
-#include "nsIChannelPolicy.h"
#include "nsChannelPolicy.h"
#include "nsIConsoleService.h"
#include "nsStyleSet.h"
#include "nsPrintfCString.h"
using namespace mozilla;
--- a/layout/style/nsFontFaceLoader.h
+++ b/layout/style/nsFontFaceLoader.h
@@ -6,25 +6,22 @@
/* code for loading in @font-face defined font data */
#ifndef nsFontFaceLoader_h_
#define nsFontFaceLoader_h_
#include "nsCOMPtr.h"
#include "nsIStreamLoader.h"
-#include "nsIURI.h"
#include "nsIChannel.h"
-#include "nsITimer.h"
#include "gfxUserFontSet.h"
#include "nsHashKeys.h"
#include "nsTHashtable.h"
#include "nsCSSRules.h"
-class nsIRequest;
class nsISupports;
class nsPresContext;
class nsIPrincipal;
class nsFontFaceLoader;
class nsCSSFontFaceRule;
// nsUserFontSet - defines the loading mechanism for downloadable fonts
--- a/layout/style/nsHTMLCSSStyleSheet.cpp
+++ b/layout/style/nsHTMLCSSStyleSheet.cpp
@@ -3,28 +3,22 @@
* 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/. */
/*
* style sheet and style rule processor representing style attributes
*/
#include "nsHTMLCSSStyleSheet.h"
-#include "nsCRT.h"
-#include "nsIAtom.h"
-#include "nsIURL.h"
-#include "nsCSSPseudoElements.h"
-#include "nsIStyleRule.h"
#include "mozilla/css/StyleRule.h"
#include "nsIStyleRuleProcessor.h"
#include "nsPresContext.h"
#include "nsIDocument.h"
#include "nsCOMPtr.h"
#include "nsRuleWalker.h"
-#include "nsRuleData.h"
#include "nsRuleProcessorData.h"
#include "mozilla/dom/Element.h"
#include "nsAttrValue.h"
#include "nsAttrValueInlines.h"
using namespace mozilla::dom;
namespace css = mozilla::css;
--- a/layout/style/nsHTMLStyleSheet.cpp
+++ b/layout/style/nsHTMLStyleSheet.cpp
@@ -13,29 +13,23 @@
*/
/*
* style sheet and style rule processor representing data from presentational
* HTML attributes
*/
#include "nsHTMLStyleSheet.h"
-#include "nsINameSpaceManager.h"
-#include "nsIAtom.h"
-#include "nsIURL.h"
#include "nsMappedAttributes.h"
-#include "nsILink.h"
-#include "nsStyleContext.h"
#include "nsGkAtoms.h"
#include "nsPresContext.h"
#include "nsEventStates.h"
#include "nsIDocument.h"
#include "nsIPresShell.h"
#include "nsStyleConsts.h"
-#include "nsCSSAnonBoxes.h"
#include "nsRuleWalker.h"
#include "nsRuleData.h"
#include "nsError.h"
#include "nsRuleProcessorData.h"
#include "nsCSSRuleProcessor.h"
#include "mozilla/dom/Element.h"
#include "nsCSSFrameConstructor.h"
--- a/layout/style/nsHTMLStyleSheet.h
+++ b/layout/style/nsHTMLStyleSheet.h
@@ -7,18 +7,16 @@
/*
* style sheet and style rule processor representing data from presentational
* HTML attributes
*/
#ifndef nsHTMLStyleSheet_h_
#define nsHTMLStyleSheet_h_
-#include "mozilla/Attributes.h"
-
#include "nsIStyleSheet.h"
#include "nsIStyleRuleProcessor.h"
#include "nsIStyleRule.h"
#include "pldhash.h"
#include "nsCOMPtr.h"
#include "nsColor.h"
#include "mozilla/Attributes.h"
--- a/layout/style/nsLayoutStylesheetCache.cpp
+++ b/layout/style/nsLayoutStylesheetCache.cpp
@@ -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/. */
#include "nsLayoutStylesheetCache.h"
#include "nsAppDirectoryServiceDefs.h"
#include "mozilla/css/Loader.h"
#include "nsIFile.h"
-#include "nsLayoutCID.h"
#include "nsIMemoryReporter.h"
#include "nsNetUtil.h"
#include "nsIObserverService.h"
#include "nsServiceManagerUtils.h"
#include "nsIXULRuntime.h"
#include "nsCSSStyleSheet.h"
NS_MEMORY_REPORTER_MALLOC_SIZEOF_FUN(LayoutStyleSheetCacheMallocSizeOf)
--- a/layout/style/nsLayoutStylesheetCache.h
+++ b/layout/style/nsLayoutStylesheetCache.h
@@ -1,17 +1,16 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* 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 nsLayoutStylesheetCache_h__
#define nsLayoutStylesheetCache_h__
-#include "nsCOMPtr.h"
#include "nsIObserver.h"
#include "nsAutoPtr.h"
#include "mozilla/Attributes.h"
class nsIFile;
class nsCSSStyleSheet;
class nsIURI;
--- a/layout/style/nsMediaFeatures.cpp
+++ b/layout/style/nsMediaFeatures.cpp
@@ -1,26 +1,21 @@
/* vim: set shiftwidth=4 tabstop=8 autoindent cindent expandtab: */
/* 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/. */
/* the features that media queries can test */
-#include "mozilla/Util.h"
-
#include "nsMediaFeatures.h"
#include "nsGkAtoms.h"
#include "nsCSSKeywords.h"
#include "nsStyleConsts.h"
#include "nsPresContext.h"
#include "nsCSSValue.h"
-#include "nsIDocShell.h"
-#include "nsLayoutUtils.h"
-#include "mozilla/LookAndFeel.h"
#include "nsCSSRuleProcessor.h"
using namespace mozilla;
static const int32_t kOrientationKeywords[] = {
eCSSKeyword_portrait, NS_STYLE_ORIENTATION_PORTRAIT,
eCSSKeyword_landscape, NS_STYLE_ORIENTATION_LANDSCAPE,
eCSSKeyword_UNKNOWN, -1
--- a/layout/style/nsMediaFeatures.h
+++ b/layout/style/nsMediaFeatures.h
@@ -3,17 +3,17 @@
* 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/. */
/* the features that media queries can test */
#ifndef nsMediaFeatures_h_
#define nsMediaFeatures_h_
-#include "nscore.h"
+#include "nsError.h"
class nsIAtom;
class nsPresContext;
class nsCSSValue;
struct nsMediaFeature;
typedef nsresult
(* nsMediaFeatureValueGetter)(nsPresContext* aPresContext,
--- a/layout/style/nsNthIndexCache.h
+++ b/layout/style/nsNthIndexCache.h
@@ -1,16 +1,15 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* 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 nsContentIndexCache_h__
#define nsContentIndexCache_h__
-#include "nscore.h"
#include "js/HashTable.h"
#include "mozilla/dom/Element.h"
/*
* A class that computes and caches the indices used for :nth-* pseudo-class
* matching.
*/
--- a/layout/style/nsROCSSPrimitiveValue.cpp
+++ b/layout/style/nsROCSSPrimitiveValue.cpp
@@ -2,18 +2,18 @@
/* 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/. */
/* DOM object representing values in DOM computed style */
#include "nsROCSSPrimitiveValue.h"
+#include "mozilla/dom/CSSPrimitiveValueBinding.h"
#include "nsContentUtils.h"
-#include "mozilla/dom/CSSPrimitiveValueBinding.h"
#include "nsPresContext.h"
#include "nsStyleUtil.h"
#include "nsDOMCSSRGBColor.h"
#include "nsDOMCSSRect.h"
#include "nsIURI.h"
#include "nsError.h"
using namespace mozilla;
--- a/layout/style/nsROCSSPrimitiveValue.h
+++ b/layout/style/nsROCSSPrimitiveValue.h
@@ -7,22 +7,20 @@
#ifndef nsROCSSPrimitiveValue_h___
#define nsROCSSPrimitiveValue_h___
#include "nsIDOMCSSValue.h"
#include "nsIDOMCSSPrimitiveValue.h"
#include "nsCSSKeywords.h"
#include "CSSValue.h"
-#include "nsAutoPtr.h"
+#include "nsCOMPtr.h"
#include "nsCoord.h"
-#include "nsWrapperCache.h"
class nsIURI;
-class nsComputedDOMStyle;
class nsDOMCSSRect;
class nsDOMCSSRGBColor;
/**
* Read-only CSS primitive value - a DOM object representing values in DOM
* computed style.
*/
class nsROCSSPrimitiveValue MOZ_FINAL : public mozilla::dom::CSSValue,
--- a/layout/style/nsRuleData.cpp
+++ b/layout/style/nsRuleData.cpp
@@ -1,15 +1,14 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* 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/. */
#include "nsRuleData.h"
-#include "nsCSSProps.h"
#include "nsPresArena.h"
#include "mozilla/StandardInteger.h"
inline size_t
nsRuleData::GetPoisonOffset()
{
// Fill in mValueOffsets such that mValueStorage + mValueOffsets[i]
--- a/layout/style/nsRuleNode.cpp
+++ b/layout/style/nsRuleNode.cpp
@@ -13,45 +13,37 @@
#include "mozilla/Assertions.h"
#include "mozilla/DebugOnly.h"
#include "mozilla/Likely.h"
#include "mozilla/Util.h"
#include "nsRuleNode.h"
#include "nscore.h"
-#include "nsIServiceManager.h"
#include "nsIWidget.h"
#include "nsIPresShell.h"
#include "nsFontMetrics.h"
#include "gfxFont.h"
-#include "nsStyleUtil.h"
#include "nsCSSPseudoElements.h"
#include "nsThemeConstants.h"
-#include "nsITheme.h"
#include "pldhash.h"
#include "nsStyleContext.h"
#include "nsStyleSet.h"
#include "nsStyleStruct.h"
#include "nsSize.h"
-#include "imgIRequest.h"
#include "nsRuleData.h"
#include "nsIStyleRule.h"
#include "nsBidiUtils.h"
-#include "nsUnicharUtils.h"
#include "nsStyleStructInlines.h"
-#include "nsStyleTransformMatrix.h"
-#include "nsCSSKeywords.h"
#include "nsCSSProps.h"
#include "nsTArray.h"
#include "nsContentUtils.h"
#include "CSSCalc.h"
#include "nsPrintfCString.h"
-#include "mozilla/dom/Element.h"
#include "mozilla/LookAndFeel.h"
#if defined(_MSC_VER) || defined(__MINGW32__)
#include <malloc.h>
#ifdef _MSC_VER
#define alloca _alloca
#endif
#endif
--- a/layout/style/nsRuleNode.h
+++ b/layout/style/nsRuleNode.h
@@ -12,17 +12,16 @@
#define nsRuleNode_h___
#include "nsPresContext.h"
#include "nsStyleStruct.h"
#include "mozilla/StandardInteger.h"
class nsStyleContext;
-struct PLDHashTable;
struct nsRuleData;
class nsIStyleRule;
struct nsCSSValueList;
class nsCSSValue;
struct nsCSSRect;
class nsStyleCoord;
--- a/layout/style/nsStyleAnimation.cpp
+++ b/layout/style/nsStyleAnimation.cpp
@@ -4,32 +4,31 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* Utilities for animation of computed style values */
#include "mozilla/Util.h"
#include "mozilla/MathAlgorithms.h"
#include "nsStyleAnimation.h"
+#include "nsStyleTransformMatrix.h"
#include "nsCOMArray.h"
#include "nsIStyleRule.h"
#include "mozilla/css/StyleRule.h"
#include "nsString.h"
#include "nsStyleContext.h"
#include "nsStyleSet.h"
#include "nsComputedDOMStyle.h"
#include "nsCSSParser.h"
#include "mozilla/css/Declaration.h"
#include "mozilla/dom/Element.h"
#include "mozilla/FloatingPoint.h"
#include "mozilla/Likely.h"
-#include "prlog.h"
#include "gfxMatrix.h"
#include "gfxQuaternion.h"
-#include "nsPrintfCString.h"
#include <cstdlib> // for std::abs(int/long)
#include <cmath> // for std::abs(float/double)
using namespace mozilla;
// HELPER METHODS
// --------------
/*
--- a/layout/style/nsStyleAnimation.h
+++ b/layout/style/nsStyleAnimation.h
@@ -11,19 +11,17 @@
#include "nsAString.h"
#include "nsCRTGlue.h"
#include "nsStringBuffer.h"
#include "nsCSSProperty.h"
#include "nsCoord.h"
#include "nsColor.h"
#include "nsCSSValue.h"
-class nsPresContext;
class nsStyleContext;
-struct nsCSSRect;
class gfx3DMatrix;
namespace mozilla {
namespace dom {
class Element;
} // namespace dom
} // namespace mozilla
--- a/layout/style/nsStyleContext.cpp
+++ b/layout/style/nsStyleContext.cpp
@@ -2,28 +2,28 @@
/* 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/. */
/* the interface (to internal code) for retrieving computed style data */
#include "mozilla/DebugOnly.h"
+#include "nsCSSAnonBoxes.h"
#include "nsStyleConsts.h"
#include "nsString.h"
#include "nsPresContext.h"
#include "nsIStyleRule.h"
#include "nsCOMPtr.h"
#include "nsStyleSet.h"
#include "nsIPresShell.h"
#include "nsRuleNode.h"
#include "nsStyleContext.h"
-#include "prlog.h"
#include "nsStyleAnimation.h"
#include "sampler.h"
#ifdef DEBUG
// #define NOISY_DEBUG
#endif
using namespace mozilla;
--- a/layout/style/nsStyleContext.h
+++ b/layout/style/nsStyleContext.h
@@ -4,19 +4,19 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* the interface (to internal code) for retrieving computed style data */
#ifndef _nsStyleContext_h_
#define _nsStyleContext_h_
#include "nsRuleNode.h"
-#include "nsIAtom.h"
#include "nsCSSPseudoElements.h"
+class nsIAtom;
class nsPresContext;
/**
* An nsStyleContext represents the computed style data for an element.
* The computed style data are stored in a set of structs (see
* nsStyleStruct.h) that are cached either on the style context or in
* the rule tree (see nsRuleNode.h for a description of this caching and
* how the cached structs are shared).
--- a/layout/style/nsStyleCoord.cpp
+++ b/layout/style/nsStyleCoord.cpp
@@ -1,21 +1,16 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* 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/. */
/* representation of length values in computed style data */
#include "nsStyleCoord.h"
-#include "nsString.h"
-#include "nsCRT.h"
-#include "prlog.h"
-#include "nsMathUtils.h"
-#include "nsStyleContext.h"
#include "mozilla/HashFunctions.h"
nsStyleCoord::nsStyleCoord(nsStyleUnit aUnit)
: mUnit(aUnit)
{
NS_ASSERTION(aUnit < eStyleUnit_Percent, "not a valueless unit");
if (aUnit >= eStyleUnit_Percent) {
mUnit = eStyleUnit_Null;
--- a/layout/style/nsStyleCoord.h
+++ b/layout/style/nsStyleCoord.h
@@ -3,22 +3,18 @@
* 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/. */
/* representation of length values in computed style data */
#ifndef nsStyleCoord_h___
#define nsStyleCoord_h___
-#include "nscore.h"
#include "nsCoord.h"
-#include "nsCRT.h"
#include "nsStyleConsts.h"
-class nsString;
-class nsStyleContext;
enum nsStyleUnit {
eStyleUnit_Null = 0, // (no value) value is not specified
eStyleUnit_Normal = 1, // (no value)
eStyleUnit_Auto = 2, // (no value)
eStyleUnit_None = 3, // (no value)
eStyleUnit_Percent = 10, // (float) 1.0 == 100%
eStyleUnit_Factor = 11, // (float) a multiplier
--- a/layout/style/nsStyleSet.cpp
+++ b/layout/style/nsStyleSet.cpp
@@ -7,17 +7,16 @@
* the container for the style sheets that apply to a presentation, and
* the internal API that the style system exposes for creating (and
* potentially re-creating) style contexts
*/
#include "mozilla/Util.h"
#include "nsStyleSet.h"
-#include "nsNetUtil.h"
#include "nsCSSStyleSheet.h"
#include "nsIDocumentInlines.h"
#include "nsRuleWalker.h"
#include "nsStyleContext.h"
#include "mozilla/css/StyleRule.h"
#include "nsCSSAnonBoxes.h"
#include "nsCSSPseudoElements.h"
#include "nsCSSRuleProcessor.h"
--- a/layout/style/nsStyleSet.h
+++ b/layout/style/nsStyleSet.h
@@ -18,17 +18,16 @@
#include "nsCSSStyleSheet.h"
#include "nsBindingManager.h"
#include "nsRuleNode.h"
#include "nsTArray.h"
#include "nsCOMArray.h"
#include "nsAutoPtr.h"
#include "nsIStyleRule.h"
#include "nsCSSPseudoElements.h"
-#include "nsCSSAnonBoxes.h"
#include "mozilla/Attributes.h"
class nsIURI;
class nsCSSFontFaceRule;
class nsCSSKeyframesRule;
class nsCSSPageRule;
class nsRuleWalker;
struct ElementDependentRuleProcessorData;
--- a/layout/style/nsStyleStruct.cpp
+++ b/layout/style/nsStyleStruct.cpp
@@ -10,32 +10,26 @@
#include "nsStyleStruct.h"
#include "nsStyleStructInlines.h"
#include "nsStyleConsts.h"
#include "nsThemeConstants.h"
#include "nsString.h"
#include "nsPresContext.h"
#include "nsIWidget.h"
-#include "nsIStyleRule.h"
#include "nsCRTGlue.h"
#include "nsCSSProps.h"
#include "nsCOMPtr.h"
-#include "nsIFrame.h"
-#include "nsHTMLReflowState.h"
-#include "prenv.h"
-
-#include "nsSVGUtils.h"
+
#include "nsBidiUtils.h"
#include "nsLayoutUtils.h"
#include "imgIRequest.h"
#include "imgIContainer.h"
-#include "prlog.h"
#include "mozilla/Likely.h"
#include <algorithm>
MOZ_STATIC_ASSERT((((1 << nsStyleStructID_Length) - 1) &
~(NS_STYLE_INHERIT_MASK)) == 0,
"Not enough bits in NS_STYLE_INHERIT_MASK");
--- a/layout/style/nsStyleStruct.h
+++ b/layout/style/nsStyleStruct.h
@@ -21,27 +21,23 @@
#include "nsStyleCoord.h"
#include "nsStyleConsts.h"
#include "nsChangeHint.h"
#include "nsPresContext.h"
#include "nsCOMPtr.h"
#include "nsCOMArray.h"
#include "nsTArray.h"
#include "nsIAtom.h"
-#include "nsIURI.h"
#include "nsCSSValue.h"
-#include "nsStyleTransformMatrix.h"
-#include "nsAlgorithm.h"
#include "imgRequestProxy.h"
-#include "gfxRect.h"
#include <algorithm>
class nsIFrame;
+class nsIURI;
class imgIContainer;
-struct nsCSSValueList;
// Includes nsStyleStructID.
#include "nsStyleStructFwd.h"
// Bits for each struct.
// NS_STYLE_INHERIT_BIT defined in nsStyleStructFwd.h
#define NS_STYLE_INHERIT_MASK 0x007fffff
--- a/layout/style/nsStyleTransformMatrix.cpp
+++ b/layout/style/nsStyleTransformMatrix.cpp
@@ -3,24 +3,20 @@
* 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/. */
/*
* A class used for intermediate representations of the -moz-transform property.
*/
#include "nsStyleTransformMatrix.h"
-#include "nsAutoPtr.h"
#include "nsCSSValue.h"
-#include "nsStyleContext.h"
#include "nsPresContext.h"
#include "nsRuleNode.h"
#include "nsCSSKeywords.h"
-#include "nsMathUtils.h"
-#include "CSSCalc.h"
#include "nsStyleAnimation.h"
namespace css = mozilla::css;
namespace nsStyleTransformMatrix {
/* Note on floating point precision: The transform matrix is an array
* of single precision 'float's, and so are most of the input values
--- a/layout/style/nsStyleTransformMatrix.h
+++ b/layout/style/nsStyleTransformMatrix.h
@@ -8,21 +8,21 @@
*/
#ifndef nsStyleTransformMatrix_h_
#define nsStyleTransformMatrix_h_
#include "nsCSSValue.h"
#include "gfxMatrix.h"
#include "gfx3DMatrix.h"
-#include "nsRect.h"
struct nsCSSValueList;
class nsStyleContext;
class nsPresContext;
+struct nsRect;
/**
* A helper to generate gfxMatrixes from css transform functions.
*/
namespace nsStyleTransformMatrix {
/**
* Return the transform function, as an nsCSSKeyword, for the given
--- a/layout/style/nsStyleUtil.cpp
+++ b/layout/style/nsStyleUtil.cpp
@@ -1,28 +1,18 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* 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/. */
-#include <math.h>
-
-#include "mozilla/Util.h"
-
#include "nsStyleUtil.h"
-#include "nsCRT.h"
#include "nsStyleConsts.h"
-#include "nsGkAtoms.h"
#include "nsIContent.h"
-#include "nsINameSpaceManager.h"
-#include "nsIURI.h"
-#include "nsNetUtil.h"
#include "nsReadableUtils.h"
-#include "nsTextFormatter.h"
#include "nsCSSProps.h"
#include "nsRuleNode.h"
using namespace mozilla;
//------------------------------------------------------------------------------
// Font Algorithm Code
//------------------------------------------------------------------------------
--- a/layout/style/nsStyleUtil.h
+++ b/layout/style/nsStyleUtil.h
@@ -2,26 +2,22 @@
/* 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 nsStyleUtil_h___
#define nsStyleUtil_h___
#include "nsCoord.h"
#include "nsCSSProperty.h"
-#include "gfxFontFeatures.h"
-#include "nsTArray.h"
-#include "nsCSSValue.h"
-struct nsStyleBackground;
-class nsString;
+class nsCSSValue;
class nsStringComparator;
class nsIContent;
-
-
+struct gfxFontFeature;
+template <class E> class nsTArray;
// Style utility functions
class nsStyleUtil {
public:
static bool DashMatchCompare(const nsAString& aAttributeValue,
const nsAString& aSelectorValue,
const nsStringComparator& aComparator);
--- a/layout/svg/nsSVGIntegrationUtils.cpp
+++ b/layout/svg/nsSVGIntegrationUtils.cpp
@@ -3,16 +3,17 @@
* 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/. */
// Main header first:
#include "nsSVGIntegrationUtils.h"
// Keep others in (case-insensitive) order:
#include "gfxDrawable.h"
+#include "nsCSSAnonBoxes.h"
#include "nsDisplayList.h"
#include "nsLayoutUtils.h"
#include "nsRenderingContext.h"
#include "nsSVGClipPathFrame.h"
#include "nsSVGEffects.h"
#include "nsSVGElement.h"
#include "nsSVGFilterFrame.h"
#include "nsSVGFilterPaintCallback.h"