mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 22:32:46 +00:00
Bug 1194639 part 3 - Report changes to startTime to animation mutation observers; r=heycam
This commit is contained in:
parent
eab83a05b4
commit
66cb8a4081
@ -128,6 +128,12 @@ Animation::SetTimeline(AnimationTimeline* aTimeline)
|
|||||||
void
|
void
|
||||||
Animation::SetStartTime(const Nullable<TimeDuration>& aNewStartTime)
|
Animation::SetStartTime(const Nullable<TimeDuration>& aNewStartTime)
|
||||||
{
|
{
|
||||||
|
if (aNewStartTime == mStartTime) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
AutoMutationBatchForAnimation mb(*this);
|
||||||
|
|
||||||
Nullable<TimeDuration> timelineTime;
|
Nullable<TimeDuration> timelineTime;
|
||||||
if (mTimeline) {
|
if (mTimeline) {
|
||||||
// The spec says to check if the timeline is active (has a resolved time)
|
// 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);
|
UpdateTiming(SeekFlag::NoSeek, SyncNotifyFlag::Async);
|
||||||
|
if (IsRelevant()) {
|
||||||
|
nsNodeUtils::AnimationChanged(this);
|
||||||
|
}
|
||||||
PostUpdate();
|
PostUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -693,6 +693,7 @@ function assert_records(expected, desc) {
|
|||||||
// notification.
|
// notification.
|
||||||
[
|
[
|
||||||
{ prop: "playbackRate", val: 0.5 },
|
{ prop: "playbackRate", val: 0.5 },
|
||||||
|
{ prop: "startTime", val: 50000 },
|
||||||
].forEach(function(aChangeTest) {
|
].forEach(function(aChangeTest) {
|
||||||
addAsyncAnimTest(`single_animation_api_change_${aChangeTest.prop}`,
|
addAsyncAnimTest(`single_animation_api_change_${aChangeTest.prop}`,
|
||||||
aOptions, function*() {
|
aOptions, function*() {
|
||||||
|
Loading…
Reference in New Issue
Block a user