Bug 1181392 part 8 - Remove use of IsFinishedTransition from nsTransitionManager::PruneCompletedTransitions; r=dbaron

This patch generalizes the logic in
nsTransitionManager::PruneCompletedTransitions to consider all transitions that
are no longer current (i.e. not running or scheduled to run) rather than
those marked as finished.
This commit is contained in:
Brian Birtles 2015-08-07 12:29:36 +09:00
parent 73a581c4b8
commit 74e8061ed0

View File

@ -740,15 +740,15 @@ nsTransitionManager::PruneCompletedTransitions(mozilla::dom::Element* aElement,
do {
--i;
Animation* anim = animations[i];
dom::KeyframeEffectReadOnly* effect = anim->GetEffect();
if (!effect->IsFinishedTransition()) {
if (anim->HasCurrentEffect()) {
continue;
}
MOZ_ASSERT(effect && effect->Properties().Length() == 1,
dom::KeyframeEffectReadOnly* effect = anim->GetEffect();
MOZ_ASSERT(effect->Properties().Length() == 1,
"Should have one animation property for a transition");
MOZ_ASSERT(effect && effect->Properties()[0].mSegments.Length() == 1,
MOZ_ASSERT(effect->Properties()[0].mSegments.Length() == 1,
"Animation property should have one segment for a transition");
const AnimationProperty& prop = effect->Properties()[0];
const AnimationPropertySegment& segment = prop.mSegments[0];