Bug 1437723: Preemptively fix unified bustage in layout/style by adding missing includes/namespaces/forward-decls. r=emilio
authorDaniel Holbert <dholbert@cs.stanford.edu>
Mon, 12 Feb 2018 16:53:44 -0800
changeset 403608 e4c62105bc00f18227dca8fef28547d41b5a758e
parent 403607 5acf2f6a2b5b1b5fc95250c2462855eede27ffbf
child 403609 04ddbc05db8726325f396db617a0741d056309ac
push id33442
push userdluca@mozilla.com
push dateWed, 14 Feb 2018 22:20:04 +0000
treeherdermozilla-central@9284d8cfa1e7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersemilio
bugs1437723
milestone60.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 1437723: Preemptively fix unified bustage in layout/style by adding missing includes/namespaces/forward-decls. r=emilio MozReview-Commit-ID: 8ljZkAqgT4N
layout/style/CSSKeyframeRule.h
layout/style/CSSMozDocumentRule.cpp
layout/style/CachedInheritingStyles.cpp
layout/style/CachedInheritingStyles.h
layout/style/DocumentStyleRootIterator.h
layout/style/GeckoStyleContext.cpp
layout/style/Rule.cpp
layout/style/ServoCSSParser.cpp
layout/style/ServoCSSParser.h
layout/style/ServoCSSRuleList.cpp
layout/style/ServoKeyframeRule.h
layout/style/ServoStyleRule.cpp
layout/style/StyleRule.cpp
layout/style/StyleSheet.cpp
layout/style/nsCSSFontFaceRule.cpp
layout/style/nsCSSPseudoClasses.h
layout/style/nsCSSRuleProcessor.cpp
layout/style/nsCSSRules.cpp
layout/style/nsMediaFeatures.h
layout/style/nsROCSSPrimitiveValue.cpp
--- a/layout/style/CSSKeyframeRule.h
+++ b/layout/style/CSSKeyframeRule.h
@@ -4,16 +4,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/. */
 
 #ifndef mozilla_dom_CSSKeyframeRule_h
 #define mozilla_dom_CSSKeyframeRule_h
 
 #include "mozilla/css/Rule.h"
 
+class nsICSSDeclaration;
+
 namespace mozilla {
 namespace dom {
 
 class CSSKeyframeRule : public css::Rule
 {
 protected:
   using css::Rule::Rule;
   virtual ~CSSKeyframeRule() {}
--- a/layout/style/CSSMozDocumentRule.cpp
+++ b/layout/style/CSSMozDocumentRule.cpp
@@ -1,16 +1,17 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 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/. */
 
 #include "mozilla/dom/CSSMozDocumentRule.h"
 #include "mozilla/dom/CSSMozDocumentRuleBinding.h"
+#include "nsContentUtils.h"
 
 namespace mozilla {
 namespace dom {
 
 using namespace mozilla::css;
 
 /* virtual */ JSObject*
 CSSMozDocumentRule::WrapObject(JSContext* aCx,
--- a/layout/style/CachedInheritingStyles.cpp
+++ b/layout/style/CachedInheritingStyles.cpp
@@ -1,17 +1,19 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 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/. */
 
+#include "mozilla/CachedInheritingStyles.h"
+
+#include "mozilla/ServoStyleContext.h"
+#include "nsCOMPtr.h"
 #include "nsIMemoryReporter.h"
-#include "mozilla/CachedInheritingStyles.h"
-#include "mozilla/ServoStyleContext.h"
 
 namespace mozilla {
 
 void
 CachedInheritingStyles::Insert(ServoStyleContext* aStyle)
 {
   MOZ_ASSERT(aStyle);
   MOZ_ASSERT(aStyle->IsInheritingAnonBox() || aStyle->IsLazilyCascadedPseudoElement());
--- a/layout/style/CachedInheritingStyles.h
+++ b/layout/style/CachedInheritingStyles.h
@@ -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/. */
 
 #ifndef mozilla_CachedInheritingStyles_h
 #define mozilla_CachedInheritingStyles_h
 
 #include "nsAtom.h"
+#include "nsCOMPtr.h"
 #include "nsTArray.h"
 
 class nsWindowSizes;
 
 namespace mozilla {
 
 class ServoStyleContext;
 
--- a/layout/style/DocumentStyleRootIterator.h
+++ b/layout/style/DocumentStyleRootIterator.h
@@ -6,16 +6,17 @@
 
 #ifndef DocumentStyleRootIterator_h
 #define DocumentStyleRootIterator_h
 
 #include "nsTArray.h"
 
 class nsIContent;
 class nsIDocument;
+class nsINode;
 
 namespace mozilla {
 
 namespace dom {
 class Element;
 } // namespace dom
 
 /**
--- a/layout/style/GeckoStyleContext.cpp
+++ b/layout/style/GeckoStyleContext.cpp
@@ -2,16 +2,17 @@
 /* vim: set ts=8 sts=2 et sw=2 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/. */
 
 #include "mozilla/GeckoStyleContext.h"
 
 #include "CSSVariableImageTable.h"
+#include "nsFontMetrics.h"
 #include "nsStyleConsts.h"
 #include "nsStyleStruct.h"
 #include "nsPresContext.h"
 #include "nsRuleNode.h"
 #include "nsStyleContextInlines.h"
 #include "nsIFrame.h"
 #include "nsLayoutUtils.h"
 #include "mozilla/ReflowInput.h"
--- a/layout/style/Rule.cpp
+++ b/layout/style/Rule.cpp
@@ -5,16 +5,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /* base class for all rule types in a CSS style sheet */
 
 #include "Rule.h"
 
 #include "mozilla/css/GroupRule.h"
 #include "nsCCUncollectableMarker.h"
+#include "nsIDocument.h"
 #include "nsWrapperCacheInlines.h"
 
 using namespace mozilla;
 using namespace mozilla::dom;
 
 namespace mozilla {
 namespace css {
 
--- a/layout/style/ServoCSSParser.cpp
+++ b/layout/style/ServoCSSParser.cpp
@@ -4,16 +4,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/. */
 
 /* CSS parsing utility functions */
 
 #include "ServoCSSParser.h"
 
 #include "mozilla/ServoBindings.h"
+#include "mozilla/ServoStyleSet.h"
 #include "nsIDocument.h"
 
 using namespace mozilla;
 
 /* static */ bool
 ServoCSSParser::IsValidCSSColor(const nsAString& aValue)
 {
   return Servo_IsValidCSSColor(&aValue);
--- a/layout/style/ServoCSSParser.h
+++ b/layout/style/ServoCSSParser.h
@@ -15,16 +15,18 @@
 #include "nsColor.h"
 #include "nsCSSPropertyID.h"
 #include "nsDOMCSSDeclaration.h"
 #include "nsString.h"
 
 class nsCSSValue;
 class nsIDocument;
 struct nsCSSRect;
+struct nsTimingFunction;
+struct RawServoDeclarationBlock;
 
 using RawGeckoGfxMatrix4x4 = mozilla::gfx::Float[16];
 
 namespace mozilla {
 namespace css {
 class Loader;
 } // namespace css
 } // namespace mozilla
--- a/layout/style/ServoCSSRuleList.cpp
+++ b/layout/style/ServoCSSRuleList.cpp
@@ -18,16 +18,18 @@
 #include "mozilla/ServoNamespaceRule.h"
 #include "mozilla/ServoPageRule.h"
 #include "mozilla/ServoStyleRule.h"
 #include "mozilla/ServoStyleSheet.h"
 #include "mozilla/ServoSupportsRule.h"
 #include "nsCSSCounterStyleRule.h"
 #include "nsCSSFontFaceRule.h"
 
+using namespace mozilla::dom;
+
 namespace mozilla {
 
 ServoCSSRuleList::ServoCSSRuleList(already_AddRefed<ServoCssRules> aRawRules,
                                    ServoStyleSheet* aDirectOwnerStyleSheet)
   : mStyleSheet(aDirectOwnerStyleSheet)
   , mRawRules(aRawRules)
 {
   Servo_CssRules_ListTypes(mRawRules, &mRules);
--- a/layout/style/ServoKeyframeRule.h
+++ b/layout/style/ServoKeyframeRule.h
@@ -5,16 +5,18 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_ServoKeyframeRule_h
 #define mozilla_ServoKeyframeRule_h
 
 #include "mozilla/dom/CSSKeyframeRule.h"
 #include "mozilla/ServoBindingTypes.h"
 
+class nsICSSDeclaration;
+
 namespace mozilla {
 
 class ServoDeclarationBlock;
 class ServoKeyframeDeclaration;
 
 class ServoKeyframeRule final : public dom::CSSKeyframeRule
 {
 public:
--- a/layout/style/ServoStyleRule.cpp
+++ b/layout/style/ServoStyleRule.cpp
@@ -11,16 +11,18 @@
 #include "mozilla/DeclarationBlockInlines.h"
 #include "mozilla/ServoBindings.h"
 #include "mozilla/ServoDeclarationBlock.h"
 #include "mozilla/dom/CSSStyleRuleBinding.h"
 #include "nsCSSPseudoClasses.h"
 
 #include "mozAutoDocUpdate.h"
 
+using namespace mozilla::dom;
+
 namespace mozilla {
 
 // -- ServoStyleRuleDeclaration ---------------------------------------
 
 ServoStyleRuleDeclaration::ServoStyleRuleDeclaration(
   already_AddRefed<RawServoDeclarationBlock> aDecls)
   : mDecls(new ServoDeclarationBlock(Move(aDecls)))
 {
--- a/layout/style/StyleRule.cpp
+++ b/layout/style/StyleRule.cpp
@@ -22,23 +22,25 @@
 #include "nsAtom.h"
 #include "nsString.h"
 #include "nsStyleUtil.h"
 #include "nsDOMCSSDeclaration.h"
 #include "nsNameSpaceManager.h"
 #include "nsXMLNameSpaceMap.h"
 #include "nsCSSPseudoClasses.h"
 #include "nsCSSAnonBoxes.h"
+#include "nsCSSRuleProcessor.h"
 #include "nsTArray.h"
 #include "nsContentUtils.h"
 #include "nsError.h"
 #include "mozAutoDocUpdate.h"
 #include "nsRuleProcessorData.h"
 
 using namespace mozilla;
+using namespace mozilla::dom;
 
 #define NS_IF_CLONE(member_)                                                  \
   PR_BEGIN_MACRO                                                              \
     if (member_) {                                                            \
       result->member_ = member_->Clone();                                     \
       if (!result->member_) {                                                 \
         delete result;                                                        \
         return nullptr;                                                        \
--- a/layout/style/StyleSheet.cpp
+++ b/layout/style/StyleSheet.cpp
@@ -4,19 +4,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/. */
 
 #include "mozilla/StyleSheet.h"
 
 #include "mozilla/css/GroupRule.h"
 #include "mozilla/dom/CSSImportRule.h"
 #include "mozilla/dom/CSSRuleList.h"
+#include "mozilla/dom/Element.h"
 #include "mozilla/dom/MediaList.h"
 #include "mozilla/dom/ShadowRoot.h"
+#include "mozilla/dom/ShadowRootBinding.h"
 #include "mozilla/ServoCSSRuleList.h"
+#include "mozilla/ServoStyleSet.h"
 #include "mozilla/ServoStyleSheet.h"
 #include "mozilla/StyleSheetInlines.h"
 #ifdef MOZ_OLD_STYLE
 #include "mozilla/CSSStyleSheet.h"
 #endif
 
 #include "mozAutoDocUpdate.h"
 #include "NullPrincipal.h"
--- a/layout/style/nsCSSFontFaceRule.cpp
+++ b/layout/style/nsCSSFontFaceRule.cpp
@@ -5,16 +5,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /* a Gecko @font-face rule */
 
 #include "nsCSSFontFaceRule.h"
 
 #include "mozilla/dom/CSSFontFaceRuleBinding.h"
 #include "mozilla/dom/CSSStyleDeclarationBinding.h"
+#include "nsStyleUtil.h"
 
 using namespace mozilla;
 using namespace mozilla::dom;
 
 // -------------------------------------------
 // nsCSSFontFaceStyleDecl and related routines
 //
 
--- a/layout/style/nsCSSPseudoClasses.h
+++ b/layout/style/nsCSSPseudoClasses.h
@@ -6,16 +6,17 @@
 
 /* atom list for CSS pseudo-classes */
 
 #ifndef nsCSSPseudoClasses_h___
 #define nsCSSPseudoClasses_h___
 
 #include "nsStringFwd.h"
 #include "mozilla/CSSEnabledState.h"
+#include "mozilla/EventStates.h"
 #include "mozilla/Maybe.h"
 
 // The following two flags along with the pref defines where this pseudo
 // class can be used:
 // * If none of the two flags is presented, the pref completely controls
 //   the availability of this pseudo class. And in that case, if it has
 //   no pref, this property is usable everywhere.
 // * If any of the flags is set, this pseudo class is always enabled in
@@ -24,16 +25,17 @@
 //   internal-only pseudo class, which cannot be used anywhere else.
 #define CSS_PSEUDO_CLASS_ENABLED_MASK                  (3<<0)
 #define CSS_PSEUDO_CLASS_ENABLED_IN_UA_SHEETS          (1<<0)
 #define CSS_PSEUDO_CLASS_ENABLED_IN_CHROME             (1<<1)
 #define CSS_PSEUDO_CLASS_ENABLED_IN_UA_SHEETS_AND_CHROME \
   (CSS_PSEUDO_CLASS_ENABLED_IN_UA_SHEETS | CSS_PSEUDO_CLASS_ENABLED_IN_CHROME)
 
 class nsAtom;
+class nsIDocument;
 
 namespace mozilla {
 namespace dom {
 class Element;
 } // namespace dom
 
 // The total count of CSSPseudoClassType is less than 256,
 // so use uint8_t as its underlying type.
--- a/layout/style/nsCSSRuleProcessor.cpp
+++ b/layout/style/nsCSSRuleProcessor.cpp
@@ -12,16 +12,17 @@
 #include "nsCSSRuleProcessor.h"
 
 #include "nsAutoPtr.h"
 #include "nsRuleProcessorData.h"
 #include <algorithm>
 #include "nsAtom.h"
 #include "PLDHashTable.h"
 #include "mozilla/MemoryReporting.h"
+#include "mozilla/StylePrefs.h"
 #include "mozilla/css/ImportRule.h"
 #include "mozilla/css/StyleRule.h"
 #include "mozilla/css/GroupRule.h"
 #include "nsIDocument.h"
 #include "nsPresContext.h"
 #include "nsGkAtoms.h"
 #include "nsUnicharUtils.h"
 #include "nsError.h"
--- a/layout/style/nsCSSRules.cpp
+++ b/layout/style/nsCSSRules.cpp
@@ -7,16 +7,17 @@
 /* rules in a CSS stylesheet other than style rules (e.g., @import rules) */
 
 #include "nsCSSRules.h"
 #include "nsCSSFontFaceRule.h"
 
 #include "mozilla/Attributes.h"
 
 #include "nsCSSValue.h"
+#include "mozAutoDocUpdate.h"
 #include "mozilla/StyleSheetInlines.h"
 #include "mozilla/MemoryReporting.h"
 #include "mozilla/css/ImportRule.h"
 #include "mozilla/css/NameSpaceRule.h"
 
 #include "nsString.h"
 #include "nsAtom.h"
 
--- a/layout/style/nsMediaFeatures.h
+++ b/layout/style/nsMediaFeatures.h
@@ -9,16 +9,17 @@
 #ifndef nsMediaFeatures_h_
 #define nsMediaFeatures_h_
 
 #include "nsCSSProps.h"
 
 class nsAtom;
 class nsIDocument;
 class nsCSSValue;
+class nsStaticAtom;
 
 struct nsMediaFeature;
 typedef void (*nsMediaFeatureValueGetter)(nsIDocument* aDocument,
                                           const nsMediaFeature* aFeature,
                                           nsCSSValue& aResult);
 
 struct nsMediaFeature
 {
--- a/layout/style/nsROCSSPrimitiveValue.cpp
+++ b/layout/style/nsROCSSPrimitiveValue.cpp
@@ -23,16 +23,17 @@
 // here to avoid exposing it to content.
 #define CSS_TURN 30U
 // Likewise we have some internal aliases for CSS_NUMBER that we don't
 // want to expose.
 #define CSS_NUMBER_INT32 31U
 #define CSS_NUMBER_UINT32 32U
 
 using namespace mozilla;
+using namespace mozilla::dom;
 
 nsROCSSPrimitiveValue::nsROCSSPrimitiveValue()
   : CSSValue(), mType(CSSPrimitiveValueBinding::CSS_PX)
 {
   mValue.mAppUnits = 0;
 }