зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
d2274a58eb
Коммит
fe06f0cdfe
|
@ -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,
|
||||
|
|
Загрузка…
Ссылка в новой задаче