From f04e40072d444472f85144258032c586e09e1da8 Mon Sep 17 00:00:00 2001 From: "L. David Baron" Date: Tue, 20 Nov 2012 11:55:14 -0800 Subject: [PATCH] Bug 813373, patch 1: Remove pres context parameters from nsStyleAnimation::UncomputeValue. r=dholbert --- content/smil/nsSMILCSSValueType.cpp | 2 +- layout/style/AnimationCommon.cpp | 4 +--- layout/style/nsStyleAnimation.cpp | 8 +------- layout/style/nsStyleAnimation.h | 10 ++++------ 4 files changed, 7 insertions(+), 17 deletions(-) diff --git a/content/smil/nsSMILCSSValueType.cpp b/content/smil/nsSMILCSSValueType.cpp index a5edb939f8ae..9c279d13c2d0 100644 --- a/content/smil/nsSMILCSSValueType.cpp +++ b/content/smil/nsSMILCSSValueType.cpp @@ -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); } diff --git a/layout/style/AnimationCommon.cpp b/layout/style/AnimationCommon.cpp index 8f084f2684e9..2db9dfe5adad 100644 --- a/layout/style/AnimationCommon.cpp +++ b/layout/style/AnimationCommon.cpp @@ -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"); } } diff --git a/layout/style/nsStyleAnimation.cpp b/layout/style/nsStyleAnimation.cpp index 71bb8df3aaf0..760c3d7fadde 100644 --- a/layout/style/nsStyleAnimation.cpp +++ b/layout/style/nsStyleAnimation.cpp @@ -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; } diff --git a/layout/style/nsStyleAnimation.h b/layout/style/nsStyleAnimation.h index 3a8702638f3b..8b6f222d6b45 100644 --- a/layout/style/nsStyleAnimation.h +++ b/layout/style/nsStyleAnimation.h @@ -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