Bug 1590639 part 4: Fix non-unified build issues in layout/style. r=emilio
authorDaniel Holbert <dholbert@cs.stanford.edu>
Wed, 23 Oct 2019 08:14:54 +0000
changeset 498899 9d5a94668e7dcd5ec183cd62743ed263bca5ef53
parent 498898 7d697ed8c7276b155403c14daaa640be0ce4c8e4
child 498900 5b8a4bd4937a2fc64cefda21933a1489559426bc
push id98771
push userdholbert@mozilla.com
push dateThu, 24 Oct 2019 17:17:29 +0000
treeherderautoland@54471d01065b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersemilio
bugs1590639
milestone72.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 1590639 part 4: Fix non-unified build issues in layout/style. r=emilio This patch: - Gives layout/generic/AnonymousContentKey.h an include for `<stdint.h>` to provide the uint8_t type, and TypedEnumBits.h to provide the MOZ_MAKE_ENUM_CLASS_BITWISE_OPERATORS macro. (This is a change in another directory, but it's needed in order for layout/style/ServoStyleSet.cpp to build successfully.) - Adds a missing "nsINode" forward-decl to dom/base/IdentifierMapEntry.h, because it uses that type in function declarations. (This change is needed in order for layout/style/CachedInheritingStyles.cpp to build successfully.) - Gives CSSStyleRule.cpp an include for PseudoStyleType.h, nsCSSPseudoElements.h, and CSSEnabledState.h because it uses those types. - Gives GeckoBindings.cpp an include for gfxTextRun.h, to provide the definition of type gfxFontGroup (so GeckoBindings can call GetFirstValidFont() on an object of that type). - Gives Loader.h an include for nsIContentInlines.h, to provide the inline function IsInUAWidget(). - Gives Rule.cpp an include for HoldDropJSObjects.h, to provide DropJSObjects(). - Gives nsImageLoader.cpp an include for DocumentInlines.h (and Document.h for good measure), to provide the inline function GetPresContext(). - Gives nsStyleStruct.cpp an include for DocumentInlines.h, to provide inline function Document::GetPresContext(). - Gives nsStyleTransformMatrix.h an include for Units.h (instead of gfxPoint.h, which isn't useful) to provide the CSSPoint type. - Gives nsStyleTransformMatrix.h an include for ServoStyleConsts.h, to provide LengthPercentage and the various StyleRotate/StyleScale/StyleTransform/etc types. (These can't be easily forward-declared, because some of them are legitimate types whereas others are type aliases. We could theoretically forward-declare all of the underlying types and then repeat the type aliases, but that'd be verbose and unmaintainable.) Depends on D50165 Differential Revision: https://phabricator.services.mozilla.com/D50166
dom/base/IdentifierMapEntry.h
layout/generic/AnonymousContentKey.h
layout/style/CSSStyleRule.cpp
layout/style/GeckoBindings.cpp
layout/style/ImageLoader.cpp
layout/style/Loader.cpp
layout/style/Rule.cpp
layout/style/nsStyleStruct.cpp
layout/style/nsStyleTransformMatrix.h
--- a/dom/base/IdentifierMapEntry.h
+++ b/dom/base/IdentifierMapEntry.h
@@ -19,16 +19,17 @@
 
 #include "nsCOMPtr.h"
 #include "nsAtom.h"
 #include "nsHashKeys.h"
 #include "nsTArray.h"
 #include "nsTHashtable.h"
 
 class nsIContent;
+class nsINode;
 class nsContentList;
 class nsBaseContentList;
 
 namespace mozilla {
 namespace dom {
 class Document;
 class Element;
 }  // namespace dom
--- a/layout/generic/AnonymousContentKey.h
+++ b/layout/generic/AnonymousContentKey.h
@@ -4,16 +4,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/. */
 
 /* values to identify particular subtrees of native anonymous content */
 
 #ifndef mozilla_AnonymousContentKey_h
 #define mozilla_AnonymousContentKey_h
 
+#include "mozilla/TypedEnumBits.h"
+#include <stdint.h>
+
 namespace mozilla {
 
 // clang-format off
 
 // We currently use cached anonymous content styles only for scrollbar parts,
 // and we can fit the type of scrollbar part element along with its different
 // options (such as orientation, and other attribute values that can affect
 // styling) into a uint8_t.
--- a/layout/style/CSSStyleRule.cpp
+++ b/layout/style/CSSStyleRule.cpp
@@ -1,19 +1,22 @@
 /* -*- 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/CSSStyleRule.h"
 
+#include "mozilla/CSSEnabledState.h"
 #include "mozilla/DeclarationBlock.h"
+#include "mozilla/PseudoStyleType.h"
 #include "mozilla/ServoBindings.h"
 #include "mozilla/dom/CSSStyleRuleBinding.h"
+#include "nsCSSPseudoElements.h"
 
 #include "mozAutoDocUpdate.h"
 
 using namespace mozilla::dom;
 
 namespace mozilla {
 namespace dom {
 
--- a/layout/style/GeckoBindings.cpp
+++ b/layout/style/GeckoBindings.cpp
@@ -8,16 +8,17 @@
 
 #include "mozilla/GeckoBindings.h"
 
 #include "ChildIterator.h"
 #include "ErrorReporter.h"
 #include "GeckoProfiler.h"
 #include "gfxFontFamilyList.h"
 #include "gfxFontFeatures.h"
+#include "gfxTextRun.h"
 #include "nsAnimationManager.h"
 #include "nsAttrValueInlines.h"
 #include "nsCSSFrameConstructor.h"
 #include "nsCSSProps.h"
 #include "nsCSSPseudoElements.h"
 #include "nsContentUtils.h"
 #include "nsDOMTokenList.h"
 #include "nsDeviceContext.h"
--- a/layout/style/ImageLoader.cpp
+++ b/layout/style/ImageLoader.cpp
@@ -4,16 +4,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/. */
 
 /* A class that handles style system image loads (other image loads are handled
  * by the nodes in the content tree).
  */
 
 #include "mozilla/css/ImageLoader.h"
+
+#include "mozilla/dom/Document.h"
+#include "mozilla/dom/DocumentInlines.h"
 #include "nsAutoPtr.h"
 #include "nsContentUtils.h"
 #include "nsLayoutUtils.h"
 #include "nsError.h"
 #include "nsDisplayList.h"
 #include "nsIFrameInlines.h"
 #include "FrameLayerBuilder.h"
 #include "SVGObserverUtils.h"
--- a/layout/style/Loader.cpp
+++ b/layout/style/Loader.cpp
@@ -20,16 +20,17 @@
 #include "mozilla/ResultExtensions.h"
 #include "mozilla/URLPreloader.h"
 #include "nsIRunnable.h"
 #include "nsITimedChannel.h"
 #include "nsSyncLoadService.h"
 #include "nsCOMPtr.h"
 #include "nsString.h"
 #include "nsIContent.h"
+#include "nsIContentInlines.h"
 #include "mozilla/dom/Document.h"
 #include "nsIURI.h"
 #include "nsNetUtil.h"
 #include "nsIProtocolHandler.h"
 #include "nsContentUtils.h"
 #include "nsIScriptSecurityManager.h"
 #include "nsContentPolicyUtils.h"
 #include "nsIHttpChannel.h"
--- a/layout/style/Rule.cpp
+++ b/layout/style/Rule.cpp
@@ -7,16 +7,17 @@
 /* base class for all rule types in a CSS style sheet */
 
 #include "Rule.h"
 
 #include "mozilla/css/GroupRule.h"
 #include "mozilla/dom/DocumentOrShadowRoot.h"
 #include "nsCCUncollectableMarker.h"
 #include "mozilla/dom/Document.h"
+#include "mozilla/HoldDropJSObjects.h"
 #include "nsWrapperCacheInlines.h"
 
 using namespace mozilla;
 using namespace mozilla::dom;
 
 namespace mozilla {
 namespace css {
 
--- a/layout/style/nsStyleStruct.cpp
+++ b/layout/style/nsStyleStruct.cpp
@@ -35,16 +35,17 @@
 #include "mozilla/dom/DocGroup.h"
 #include "mozilla/dom/ImageTracker.h"
 #include "mozilla/CORSMode.h"
 #include "mozilla/ClearOnShutdown.h"
 #include "mozilla/PreferenceSheet.h"
 #include "mozilla/Likely.h"
 #include "nsIURI.h"
 #include "mozilla/dom/Document.h"
+#include "mozilla/dom/DocumentInlines.h"
 #include <algorithm>
 #include "ImageLoader.h"
 
 using namespace mozilla;
 using namespace mozilla::dom;
 
 static const nscoord kMediumBorderWidth = nsPresContext::CSSPixelsToAppUnits(3);
 
--- a/layout/style/nsStyleTransformMatrix.h
+++ b/layout/style/nsStyleTransformMatrix.h
@@ -6,21 +6,21 @@
 
 /*
  * A class representing three matrices that can be used for style transforms.
  */
 
 #ifndef nsStyleTransformMatrix_h_
 #define nsStyleTransformMatrix_h_
 
-#include "gfxPoint.h"
 #include "mozilla/gfx/Matrix.h"
 #include "mozilla/EnumeratedArray.h"
+#include "mozilla/ServoStyleConsts.h"
 #include "nsSize.h"
-
+#include "Units.h"  // for CSSPoint
 #include <limits>
 
 class nsIFrame;
 class nsPresContext;
 struct gfxQuaternion;
 struct nsRect;
 
 namespace mozilla {