mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-17 22:32:51 +00:00
Bug 1194028 - Part 1: Implement Animation NotifyEffectTimingUpdate and KeyframeEffect SetTiming. r=bbirtles
This commit is contained in:
parent
39f9cd380f
commit
a4077879ac
@ -650,6 +650,16 @@ Animation::ComposeStyle(nsRefPtr<AnimValuesStyleRule>& aStyleRule,
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Animation::NotifyEffectTimingUpdated()
|
||||
{
|
||||
MOZ_ASSERT(mEffect,
|
||||
"We should only update timing effect when we have a target "
|
||||
"effect");
|
||||
UpdateTiming(Animation::SeekFlag::NoSeek,
|
||||
Animation::SyncNotifyFlag::Async);
|
||||
}
|
||||
|
||||
// http://w3c.github.io/web-animations/#play-an-animation
|
||||
void
|
||||
Animation::DoPlay(ErrorResult& aRv, LimitBehavior aLimitBehavior)
|
||||
|
@ -297,6 +297,9 @@ public:
|
||||
void ComposeStyle(nsRefPtr<AnimValuesStyleRule>& aStyleRule,
|
||||
nsCSSPropertySet& aSetProperties,
|
||||
bool& aNeedsRefreshes);
|
||||
|
||||
void NotifyEffectTimingUpdated();
|
||||
|
||||
protected:
|
||||
void SilentlySetCurrentTime(const TimeDuration& aNewCurrentTime);
|
||||
void SilentlySetPlaybackRate(double aPlaybackRate);
|
||||
|
@ -87,6 +87,17 @@ KeyframeEffectReadOnly::SetParentTime(Nullable<TimeDuration> aParentTime)
|
||||
mParentTime = aParentTime;
|
||||
}
|
||||
|
||||
void
|
||||
KeyframeEffectReadOnly::SetTiming(const AnimationTiming& aTiming,
|
||||
Animation& aOwningAnimation)
|
||||
{
|
||||
if (mTiming == aTiming) {
|
||||
return;
|
||||
}
|
||||
mTiming = aTiming;
|
||||
aOwningAnimation.NotifyEffectTimingUpdated();
|
||||
}
|
||||
|
||||
ComputedTiming
|
||||
KeyframeEffectReadOnly::GetComputedTimingAt(
|
||||
const Nullable<TimeDuration>& aLocalTime,
|
||||
|
@ -242,6 +242,10 @@ public:
|
||||
return mTiming;
|
||||
}
|
||||
|
||||
// FIXME: Drop |aOwningAnimation| once we make AnimationEffects track their
|
||||
// owning animation.
|
||||
void SetTiming(const AnimationTiming& aTiming, Animation& aOwningAnimtion);
|
||||
|
||||
// Return the duration from the start the active interval to the point where
|
||||
// the animation begins playback. This is zero unless the animation has
|
||||
// a negative delay in which case it is the absolute value of the delay.
|
||||
|
Loading…
x
Reference in New Issue
Block a user