Bug 1448726 - Remove NS_RULE_NODE_* constants. r?emilio draft
authorXidorn Quan <me@upsuper.org>
Mon, 26 Mar 2018 16:20:24 +1100
changeset 772432 dfc51c5bb737fad87c144f9d0ccb63103ecfa19a
parent 772430 8f32eeebfeda9b1e1ee344bb8edae5f5900f29d5
child 772433 893a7fc93f54fc7120df84be7a29b46b3a60143d
push id103912
push userxquan@mozilla.com
push dateMon, 26 Mar 2018 05:24:27 +0000
reviewersemilio
bugs1448726
milestone61.0a1
Bug 1448726 - Remove NS_RULE_NODE_* constants. r?emilio MozReview-Commit-ID: 1DWhfpBT58w
layout/style/nsStyleStruct.h
--- a/layout/style/nsStyleStruct.h
+++ b/layout/style/nsStyleStruct.h
@@ -92,37 +92,16 @@ class ImageTracker;
 #define NS_STYLE_HAS_CHILD_THAT_USES_RESET_STYLE 0x400000000
 // See ComputedStyle::IsTextCombined
 #define NS_STYLE_IS_TEXT_COMBINED          0x800000000
 // Whether a style context is a Gecko or Servo context
 #define NS_STYLE_CONTEXT_IS_GECKO          0x1000000000
 // See ComputedStyle::GetPseudoEnum
 #define NS_STYLE_CONTEXT_TYPE_SHIFT        37
 
-// Additional bits for nsRuleNode's mDependentBits:
-#define NS_RULE_NODE_IS_ANIMATION_RULE      0x01000000
-// Free bit                                 0x02000000
-#define NS_RULE_NODE_USED_DIRECTLY          0x04000000
-#define NS_RULE_NODE_IS_IMPORTANT           0x08000000
-#define NS_RULE_NODE_LEVEL_MASK             0xf0000000
-#define NS_RULE_NODE_LEVEL_SHIFT            28
-
-// Additional bits for nsRuleNode's mNoneBits:
-#define NS_RULE_NODE_HAS_ANIMATION_DATA     0x80000000
-
-static_assert(int(mozilla::SheetType::Count) - 1 <=
-                (NS_RULE_NODE_LEVEL_MASK >> NS_RULE_NODE_LEVEL_SHIFT),
-              "NS_RULE_NODE_LEVEL_MASK cannot fit SheetType");
-
-static_assert(NS_STYLE_INHERIT_MASK == (1 << nsStyleStructID_Length) - 1,
-              "NS_STYLE_INHERIT_MASK is not correct");
-
-static_assert((NS_RULE_NODE_IS_ANIMATION_RULE & NS_STYLE_INHERIT_MASK) == 0,
-  "NS_RULE_NODE_IS_ANIMATION_RULE must not overlap the style struct bits.");
-
 namespace mozilla {
 
 struct Position {
   using Coord = nsStyleCoord::CalcValue;
 
   Coord mXPosition, mYPosition;
 
   // Initialize nothing