Bug 813373, patch 1: Remove pres context parameters from nsStyleAnimation::UncomputeValue. r=dholbert

This commit is contained in:
L. David Baron 2012-11-20 11:55:14 -08:00
parent 00039d4d53
commit f04e40072d
4 changed files with 7 additions and 17 deletions

View File

@ -412,6 +412,6 @@ nsSMILCSSValueType::ValueToString(const nsSMILValue& aValue,
"Unexpected SMIL value type");
const ValueWrapper* wrapper = ExtractValueWrapper(aValue);
return !wrapper ||
nsStyleAnimation::UncomputeValue(wrapper->mPropID, wrapper->mPresContext,
nsStyleAnimation::UncomputeValue(wrapper->mPropID,
wrapper->mCSSValue, aString);
}

View File

@ -174,9 +174,7 @@ AnimValuesStyleRule::MapRuleInfoInto(nsRuleData* aRuleData)
#ifdef DEBUG
bool ok =
#endif
nsStyleAnimation::UncomputeValue(cv.mProperty,
aRuleData->mPresContext,
cv.mValue, *prop);
nsStyleAnimation::UncomputeValue(cv.mProperty, cv.mValue, *prop);
NS_ABORT_IF_FALSE(ok, "could not store computed value");
}
}

View File

@ -2338,12 +2338,9 @@ nsStyleAnimation::ComputeValue(nsCSSProperty aProperty,
bool
nsStyleAnimation::UncomputeValue(nsCSSProperty aProperty,
nsPresContext* aPresContext,
const Value& aComputedValue,
nsCSSValue& aSpecifiedValue)
{
NS_ABORT_IF_FALSE(aPresContext, "null pres context");
switch (aComputedValue.GetUnit()) {
case eUnit_Normal:
aSpecifiedValue.SetNormalValue();
@ -2430,11 +2427,9 @@ nsStyleAnimation::UncomputeValue(nsCSSProperty aProperty,
bool
nsStyleAnimation::UncomputeValue(nsCSSProperty aProperty,
nsPresContext* aPresContext,
const Value& aComputedValue,
nsAString& aSpecifiedValue)
{
NS_ABORT_IF_FALSE(aPresContext, "null pres context");
aSpecifiedValue.Truncate(); // Clear outparam, if it's not already empty
if (aComputedValue.GetUnit() == eUnit_UnparsedString) {
@ -2442,8 +2437,7 @@ nsStyleAnimation::UncomputeValue(nsCSSProperty aProperty,
return true;
}
nsCSSValue val;
if (!nsStyleAnimation::UncomputeValue(aProperty, aPresContext,
aComputedValue, val)) {
if (!nsStyleAnimation::UncomputeValue(aProperty, aComputedValue, val)) {
return false;
}

View File

@ -169,13 +169,11 @@ public:
* @return true on success, false on failure.
*/
static bool UncomputeValue(nsCSSProperty aProperty,
nsPresContext* aPresContext,
const Value& aComputedValue,
nsCSSValue& aSpecifiedValue);
const Value& aComputedValue,
nsCSSValue& aSpecifiedValue);
static bool UncomputeValue(nsCSSProperty aProperty,
nsPresContext* aPresContext,
const Value& aComputedValue,
nsAString& aSpecifiedValue);
const Value& aComputedValue,
nsAString& aSpecifiedValue);
/**
* Gets the computed value for the given property from the given style