зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1181392 part 3 - Remove use of IsFinishedTransition in KeyframeEffectReadOnly; r=dbaron
KeyframeEffectReadOnly uses IsFinishedTransition to exclude finished transitions from certain tests. This check, however, is redundant in each case. This is because any effect marked as IsFinishedTransition will have the following properties: - owning animation's PlayState() == Finished or Idle - animation phase = after or null - progress = null (this is because transitions don't fill forwards)
This commit is contained in:
Родитель
4561c8eda3
Коммит
f5d2835cea
|
@ -236,8 +236,7 @@ KeyframeEffectReadOnly::ActiveDuration(const AnimationTiming& aTiming)
|
|||
bool
|
||||
KeyframeEffectReadOnly::IsInPlay(const Animation& aAnimation) const
|
||||
{
|
||||
if (IsFinishedTransition() ||
|
||||
aAnimation.PlayState() == AnimationPlayState::Finished) {
|
||||
if (aAnimation.PlayState() == AnimationPlayState::Finished) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -248,8 +247,7 @@ KeyframeEffectReadOnly::IsInPlay(const Animation& aAnimation) const
|
|||
bool
|
||||
KeyframeEffectReadOnly::IsCurrent(const Animation& aAnimation) const
|
||||
{
|
||||
if (IsFinishedTransition() ||
|
||||
aAnimation.PlayState() == AnimationPlayState::Finished) {
|
||||
if (aAnimation.PlayState() == AnimationPlayState::Finished) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -261,10 +259,6 @@ KeyframeEffectReadOnly::IsCurrent(const Animation& aAnimation) const
|
|||
bool
|
||||
KeyframeEffectReadOnly::IsInEffect() const
|
||||
{
|
||||
if (IsFinishedTransition()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
ComputedTiming computedTiming = GetComputedTiming();
|
||||
return computedTiming.mProgress != ComputedTiming::kNullProgress;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче