mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 20:05:49 +00:00
Bug 1419709 - Move a few nsStyleStructID-related static methods out of nsRuleNode.h r=emilio
MozReview-Commit-ID: GyEMmvlH4mh --HG-- extra : rebase_source : feffb9d535fda9316dc9e34a5170ffabda3b5e22
This commit is contained in:
parent
72a1d3ff81
commit
a4faae04a1
@ -492,7 +492,7 @@ inDOMUtils::IsInheritedProperty(const nsAString &aPropertyName, bool *_retval)
|
||||
}
|
||||
|
||||
nsStyleStructID sid = nsCSSProps::kSIDTable[prop];
|
||||
*_retval = !nsCachedStyleData::IsReset(sid);
|
||||
*_retval = !nsStyleContext::IsReset(sid);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -499,7 +499,7 @@ nsCSSProps::IsInherited(nsCSSPropertyID aProperty)
|
||||
MOZ_ASSERT(!IsShorthand(aProperty));
|
||||
|
||||
nsStyleStructID sid = kSIDTable[aProperty];
|
||||
return nsCachedStyleData::IsInherited(sid);
|
||||
return nsStyleContext::IsInherited(sid);
|
||||
}
|
||||
|
||||
/* static */ bool
|
||||
|
@ -197,7 +197,7 @@ public:
|
||||
* because it was stored conditionally on the rule node.
|
||||
*/
|
||||
bool HasCachedDependentStyleData(nsStyleStructID aSID) {
|
||||
return mBits & nsCachedStyleData::GetBitForSID(aSID);
|
||||
return mBits & GetBitForSID(aSID);
|
||||
}
|
||||
|
||||
inline nsRuleNode* RuleNode();
|
||||
@ -292,6 +292,14 @@ public:
|
||||
*/
|
||||
inline void StartBackgroundImageLoads();
|
||||
|
||||
static bool IsReset(const nsStyleStructID aSID) {
|
||||
MOZ_ASSERT(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; }
|
||||
|
||||
#ifdef DEBUG
|
||||
void List(FILE* out, int32_t aIndent, bool aListDescendants = true);
|
||||
static const char* StructName(nsStyleStructID aSID);
|
||||
@ -334,8 +342,7 @@ protected:
|
||||
static bool DependencyAllowed(nsStyleStructID aOuterSID,
|
||||
nsStyleStructID aInnerSID)
|
||||
{
|
||||
return !!(sDependencyTable[aOuterSID] &
|
||||
nsCachedStyleData::GetBitForSID(aInnerSID));
|
||||
return !!(sDependencyTable[aOuterSID] & GetBitForSID(aInnerSID));
|
||||
}
|
||||
|
||||
static const uint32_t sDependencyTable[];
|
||||
|
Loading…
Reference in New Issue
Block a user