Bug 945580 - Add nsRuleNode::IsInherited helper function. r=dbaron
authorCameron McCormack <cam@mcc.id.au>
Tue, 03 Dec 2013 14:42:09 +1100
changeset 173194 4723a2e8f88747853999fd757a89de6040c360ca
parent 173193 f5c112718a0476c89c7663fe04b6b52518ee6bf4
child 173195 cd60f45d5165d7af0833433e5d913034a7cf1dd7
push id3224
push userlsblakk@mozilla.com
push dateTue, 04 Feb 2014 01:06:49 +0000
treeherdermozilla-beta@60c04d0987f1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdbaron
bugs945580
milestone28.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 945580 - Add nsRuleNode::IsInherited helper function. r=dbaron
layout/style/nsRuleNode.h
--- a/layout/style/nsRuleNode.h
+++ b/layout/style/nsRuleNode.h
@@ -122,16 +122,20 @@ struct nsCachedStyleData
   nsResetStyleData* mResetData;
 
   static bool IsReset(const nsStyleStructID aSID) {
     NS_ABORT_IF_FALSE(0 <= aSID && aSID < nsStyleStructID_Length,
                       "must be an inherited or reset SID");
     return nsStyleStructID_Reset_Start <= aSID;
   }
 
+  static bool IsInherited(const nsStyleStructID aSID) {
+    return !IsReset(aSID);
+  }
+
   static uint32_t GetBitForSID(const nsStyleStructID aSID) {
     return 1 << aSID;
   }
 
   void* NS_FASTCALL GetStyleData(const nsStyleStructID aSID) {
     if (IsReset(aSID)) {
       if (mResetData) {
         return mResetData->mStyleStructs[aSID];