diff --git a/layout/style/nsTransitionManager.cpp b/layout/style/nsTransitionManager.cpp index 4555fbe37729..aff85e02b487 100644 --- a/layout/style/nsTransitionManager.cpp +++ b/layout/style/nsTransitionManager.cpp @@ -342,6 +342,24 @@ nsTransitionManager::~nsTransitionManager() } } +static PRBool +TransExtractComputedValue(nsCSSProperty aProperty, + nsStyleContext* aStyleContext, + nsStyleAnimation::Value& aComputedValue) +{ + PRBool result = + nsStyleAnimation::ExtractComputedValue(aProperty, aStyleContext, + aComputedValue); + if (aProperty == eCSSProperty_visibility) { + NS_ABORT_IF_FALSE(aComputedValue.GetUnit() == + nsStyleAnimation::eUnit_Enumerated, + "unexpected unit"); + aComputedValue.SetIntValue(aComputedValue.GetIntValue(), + nsStyleAnimation::eUnit_Visibility); + } + return result; +} + already_AddRefed nsTransitionManager::StyleContextChanged(nsIContent *aElement, nsStyleContext *aOldStyleContext, @@ -523,24 +541,6 @@ nsTransitionManager::StyleContextChanged(nsIContent *aElement, static_cast(coverRule.forget().get())); } -static PRBool -TransExtractComputedValue(nsCSSProperty aProperty, - nsStyleContext* aStyleContext, - nsStyleAnimation::Value& aComputedValue) -{ - PRBool result = - nsStyleAnimation::ExtractComputedValue(aProperty, aStyleContext, - aComputedValue); - if (aProperty == eCSSProperty_visibility) { - NS_ABORT_IF_FALSE(aComputedValue.GetUnit() == - nsStyleAnimation::eUnit_Enumerated, - "unexpected unit"); - aComputedValue.SetIntValue(aComputedValue.GetIntValue(), - nsStyleAnimation::eUnit_Visibility); - } - return result; -} - void nsTransitionManager::ConsiderStartingTransition(nsCSSProperty aProperty, const nsTransition& aTransition,