Bug 1181392 part 4 - Remove use of IsFinishedTransition from nsLayoutUtils; r=dbaron

GetMinAndMaxScaleForAnimationProperty in nsLayoutUtils uses IsFinishedTransition
to ignore finished transitions since they should not have any effect on current
or future scale values. We can generalize this, however, and say we are only
interested in animations that are *either*:

a) running or scheduled to run in the future, i.e. "current", OR
b) applying a value, including a finished animation with a forwards fill,
   i.e. "in effect"

Elsewhere, animations that fulfil *either* of this conditions are referred to as
"relevant animations" so we can simply test for relevance in this function.
This commit is contained in:
Brian Birtles 2015-08-07 12:29:36 +09:00
parent b012191a8b
commit e06c970271

View File

@ -464,7 +464,7 @@ GetMinAndMaxScaleForAnimationProperty(const nsIFrame* aFrame,
{
for (size_t animIdx = aAnimations->mAnimations.Length(); animIdx-- != 0; ) {
dom::Animation* anim = aAnimations->mAnimations[animIdx];
if (!anim->GetEffect() || anim->GetEffect()->IsFinishedTransition()) {
if (!anim->IsRelevant()) {
continue;
}
dom::KeyframeEffectReadOnly* effect = anim->GetEffect();