Bug 1381844: Remove a few redundant casts.
MozReview-Commit-ID: 2dr72PMGKwN
--- a/layout/style/nsStyleContextInlines.h
+++ b/layout/style/nsStyleContextInlines.h
@@ -83,17 +83,17 @@ const nsStyle##name_ * nsStyleContext::D
/* We always cache inherited structs on the context when we */\
/* compute them. */ \
return nullptr; \
} \
/* Have the rulenode deal */ \
AUTO_CHECK_DEPENDENCY(gecko, eStyleStruct_##name_); \
const nsStyle##name_ * newData = \
gecko->RuleNode()-> \
- GetStyle##name_<aComputeData>(this->AsGecko(), mBits); \
+ GetStyle##name_<aComputeData>(gecko, mBits); \
/* always cache inherited data on the style context; the rule */\
/* node set the bit in mBits for us if needed. */ \
gecko->mCachedInheritedData \
.mStyleStructs[eStyleStruct_##name_] = \
const_cast<nsStyle##name_ *>(newData); \
return newData; \
} \
auto servo = AsServo(); \
@@ -150,18 +150,18 @@ const nsStyle##name_ * nsStyleContext::D
if (gecko->mCachedResetData) { \
const nsStyle##name_ * cachedData = \
static_cast<nsStyle##name_*>( \
gecko->mCachedResetData->mStyleStructs[eStyleStruct_##name_]); \
if (cachedData) /* Have it cached already, yay */ \
return cachedData; \
} \
/* Have the rulenode deal */ \
- AUTO_CHECK_DEPENDENCY(gecko, eStyleStruct_##name_); \
- return gecko->RuleNode()->GetStyle##name_<aComputeData>(this->AsGecko()); \
+ AUTO_CHECK_DEPENDENCY(gecko, eStyleStruct_##name_); \
+ return gecko->RuleNode()->GetStyle##name_<aComputeData>(gecko); \
} \
auto servo = AsServo(); \
const bool needToCompute = !(mBits & NS_STYLE_INHERIT_BIT(name_)); \
if (!aComputeData && needToCompute) { \
return nullptr; \
} \
const nsStyle##name_* data = \
servo->ComputedData()->GetStyle##name_(); \