Bug 1449400 part 2 - Remove some dependencies from ServoStyleSet.h and add some random stuff to fix breakage. r=emilio
authorXidorn Quan <me@upsuper.org>
Thu, 29 Mar 2018 22:15:46 +1100
changeset 410585 687011f7c64c16258e39ad658cb50b99d218e889
parent 410584 a812abeb4c762d302365f6110f357a73bdd0b349
child 410586 f151de3f2e3a61707454793f3f9f36fdf854613d
push id33733
push useraciure@mozilla.com
push dateThu, 29 Mar 2018 22:05:29 +0000
treeherdermozilla-central@7ca58ce09779 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersemilio
bugs1449400
milestone61.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 1449400 part 2 - Remove some dependencies from ServoStyleSet.h and add some random stuff to fix breakage. r=emilio Some of the definitions are needed for the headers removal in following patches. MozReview-Commit-ID: BCj7U7RgBLj
accessible/base/StyleInfo.h
layout/style/ComputedStyle.h
layout/style/ServoStyleSet.h
layout/style/StreamLoader.h
modules/libpref/Preferences.cpp
--- a/accessible/base/StyleInfo.h
+++ b/accessible/base/StyleInfo.h
@@ -6,16 +6,19 @@
 
 #ifndef _mozilla_a11y_style_h_
 #define _mozilla_a11y_style_h_
 
 #include "mozilla/gfx/Types.h"
 #include "mozilla/ComputedStyle.h"
 
 namespace mozilla {
+namespace dom {
+class Element;
+} // namespace dom
 namespace a11y {
 
 class StyleInfo
 {
 public:
   explicit StyleInfo(dom::Element* aElement);
   ~StyleInfo() { }
 
--- a/layout/style/ComputedStyle.h
+++ b/layout/style/ComputedStyle.h
@@ -6,23 +6,26 @@
 
 /* the interface (to internal code) for retrieving computed style data */
 
 #ifndef _ComputedStyle_h_
 #define _ComputedStyle_h_
 
 #include "nsIMemoryReporter.h"
 #include <algorithm>
+#include "mozilla/ArenaObjectID.h"
 #include "mozilla/Assertions.h"
 #include "mozilla/RestyleLogging.h"
 #include "mozilla/ServoStyleSet.h"
+#include "mozilla/ServoTypes.h"
 #include "mozilla/ServoUtils.h"
 #include "mozilla/StyleComplexColor.h"
 #include "mozilla/CachedInheritingStyles.h"
 #include "nsCSSAnonBoxes.h"
+#include "nsCSSPseudoElements.h"
 
 // Includes nsStyleStructID.
 #include "nsStyleStructFwd.h"
 
 // Bits for each struct.
 // NS_STYLE_INHERIT_BIT defined in nsStyleStructFwd.h
 #define NS_STYLE_INHERIT_MASK              0x000ffffff
 
@@ -61,30 +64,36 @@
 // See ComputedStyle::IsTextCombined
 #define NS_STYLE_IS_TEXT_COMBINED          0x800000000
 // Whether a ComputedStyle is a Gecko or Servo context
 #define NS_STYLE_CONTEXT_IS_GECKO          0x1000000000
 // See ComputedStyle::GetPseudoEnum
 #define NS_STYLE_CONTEXT_TYPE_SHIFT        37
 
 class nsAtom;
+enum nsChangeHint : uint32_t;
+class nsIPresShell;
 class nsPresContext;
 class nsWindowSizes;
 
-namespace mozilla {
-
-enum class CSSPseudoElementType : uint8_t;
-class ComputedStyle;
+#define STYLE_STRUCT(name_) struct nsStyle##name_;
+#include "nsStyleStructList.h"
+#undef STYLE_STRUCT
 
 extern "C" {
   void Servo_ComputedStyle_AddRef(const mozilla::ComputedStyle* aStyle);
   void Servo_ComputedStyle_Release(const mozilla::ComputedStyle* aStyle);
   void Gecko_ComputedStyle_Destroy(mozilla::ComputedStyle*);
 }
 
+namespace mozilla {
+
+enum class CSSPseudoElementType : uint8_t;
+class ComputedStyle;
+
 /**
  * A ComputedStyle 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 ComputedStyle or in the rule tree (see nsRuleNode.h
  * for a description of this caching and how the cached structs are shared).
  *
  * Since the data in |nsIStyleRule|s and |nsRuleNode|s are immutable (with a few
  * exceptions, like system color changes), the data in an ComputedStyle are also
--- a/layout/style/ServoStyleSet.h
+++ b/layout/style/ServoStyleSet.h
@@ -3,48 +3,52 @@
 /* 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_ServoStyleSet_h
 #define mozilla_ServoStyleSet_h
 
 #include "mozilla/AtomArray.h"
-#include "mozilla/EffectCompositor.h"
 #include "mozilla/EnumeratedArray.h"
 #include "mozilla/EventStates.h"
 #include "mozilla/MediaFeatureChange.h"
 #include "mozilla/PostTraversalTask.h"
 #include "mozilla/ServoBindingTypes.h"
-#include "mozilla/ServoElementSnapshot.h"
 #include "mozilla/ServoBindings.h"
 #include "mozilla/ServoUtils.h"
 #include "mozilla/StyleSheetInlines.h"
 #include "mozilla/SheetType.h"
 #include "mozilla/UniquePtr.h"
 #include "MainThreadUtils.h"
 #include "nsCSSPseudoElements.h"
 #include "nsCSSAnonBoxes.h"
 #include "nsChangeHint.h"
+#include "nsCoord.h"
 #include "nsAtom.h"
 #include "nsIMemoryReporter.h"
 #include "nsTArray.h"
 
 namespace mozilla {
+namespace css {
+class Rule;
+} // namespace css
 namespace dom {
 class Element;
+class ShadowRoot;
 } // namespace dom
-class CSSStyleSheet;
 class ServoRestyleManager;
 class ServoStyleSheet;
 struct Keyframe;
 class ServoElementSnapshotTable;
 class ComputedStyle;
 class ServoStyleRuleMap;
+class StyleSheet;
 } // namespace mozilla
+class gfxFontFeatureValueSet;
 class nsCSSCounterStyleRule;
 class nsIContent;
 class nsIDocument;
 class nsPresContext;
 struct nsTimingFunction;
 struct RawServoRuleNode;
 struct TreeMatchContext;
 
@@ -466,17 +470,17 @@ public:
    * is an element and which has no pseudo on its ComputedStyle (so it's the
    * actual style for the element being passed).
    */
   already_AddRefed<ComputedStyle>
   ReparentComputedStyle(ComputedStyle* aComputedStyle,
                         ComputedStyle* aNewParent,
                         ComputedStyle* aNewParentIgnoringFirstLine,
                         ComputedStyle* aNewLayoutParent,
-                        Element* aElement);
+                        dom::Element* aElement);
 
 private:
   friend class AutoSetInServoTraversal;
   friend class AutoPrepareTraversal;
 
   bool ShouldTraverseInParallel() const;
 
   /**
--- a/layout/style/StreamLoader.h
+++ b/layout/style/StreamLoader.h
@@ -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/. */
 
 #ifndef mozilla_css_StreamLoader_h
 #define mozilla_css_StreamLoader_h
 
+#include "nsIStreamListener.h"
 #include "nsString.h"
 #include "mozilla/css/SheetLoadData.h"
 
 class nsIInputStream;
 
 namespace mozilla {
 namespace css {
 
--- a/modules/libpref/Preferences.cpp
+++ b/modules/libpref/Preferences.cpp
@@ -24,16 +24,17 @@
 #include "mozilla/Omnijar.h"
 #include "mozilla/Preferences.h"
 #include "mozilla/ResultExtensions.h"
 #include "mozilla/ScopeExit.h"
 #include "mozilla/Services.h"
 #include "mozilla/ServoStyleSet.h"
 #include "mozilla/StaticPrefs.h"
 #include "mozilla/SyncRunnable.h"
+#include "mozilla/SystemGroup.h"
 #include "mozilla/Telemetry.h"
 #include "mozilla/UniquePtrExtensions.h"
 #include "mozilla/URLPreloader.h"
 #include "mozilla/Variant.h"
 #include "mozilla/Vector.h"
 #include "nsAppDirectoryServiceDefs.h"
 #include "nsAutoPtr.h"
 #include "nsCategoryManagerUtils.h"