Bug 1194639 part 3 - Report changes to startTime to animation mutation observers; r=heycam

This commit is contained in:
Brian Birtles 2015-10-22 15:16:18 +09:00
Родитель eab83a05b4
Коммит 66cb8a4081
2 изменённых файлов: 10 добавлений и 0 удалений

Просмотреть файл

@ -128,6 +128,12 @@ Animation::SetTimeline(AnimationTimeline* aTimeline)
void
Animation::SetStartTime(const Nullable<TimeDuration>& aNewStartTime)
{
if (aNewStartTime == mStartTime) {
return;
}
AutoMutationBatchForAnimation mb(*this);
Nullable<TimeDuration> timelineTime;
if (mTimeline) {
// The spec says to check if the timeline is active (has a resolved time)
@ -157,6 +163,9 @@ Animation::SetStartTime(const Nullable<TimeDuration>& aNewStartTime)
}
UpdateTiming(SeekFlag::NoSeek, SyncNotifyFlag::Async);
if (IsRelevant()) {
nsNodeUtils::AnimationChanged(this);
}
PostUpdate();
}

Просмотреть файл

@ -693,6 +693,7 @@ function assert_records(expected, desc) {
// notification.
[
{ prop: "playbackRate", val: 0.5 },
{ prop: "startTime", val: 50000 },
].forEach(function(aChangeTest) {
addAsyncAnimTest(`single_animation_api_change_${aChangeTest.prop}`,
aOptions, function*() {