Make setting property after setting transition-duration and transition-delay to 0 stop running transitions on that property: step 1: move static function up. (Bug 522643) r=bzbarsky

This commit is contained in:
L. David Baron 2009-12-21 16:46:25 -05:00
Родитель d2274a58eb
Коммит fe06f0cdfe
1 изменённых файлов: 18 добавлений и 18 удалений

Просмотреть файл

@ -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<nsIStyleRule>
nsTransitionManager::StyleContextChanged(nsIContent *aElement,
nsStyleContext *aOldStyleContext,
@ -523,24 +541,6 @@ nsTransitionManager::StyleContextChanged(nsIContent *aElement,
static_cast<nsIStyleRule*>(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,