Bug 686281 - A static assertion to keep value correctness of NS_RULE_NODE_IS_ANIMATION_RULE; r=:dbaron.
--- a/layout/style/nsStyleStruct.h
+++ b/layout/style/nsStyleStruct.h
@@ -90,16 +90,18 @@ struct nsStyleVisibility;
// 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_RULE_NODE_IS_ANIMATION_RULE == (1 << nsStyleStructID_Length),
+ "NS_RULE_NODE_IS_ANIMATION_RULE must not overlap the style struct bits.");
// The lifetime of these objects is managed by the presshell's arena.
struct nsStyleFont {
nsStyleFont(const nsFont& aFont, nsPresContext *aPresContext);
nsStyleFont(const nsStyleFont& aStyleFont);
explicit nsStyleFont(nsPresContext *aPresContext);
~nsStyleFont(void) {
MOZ_COUNT_DTOR(nsStyleFont);