Bug 1244633 - Part 1: implement AnimationEffectTiming delay. r=birtles
authorDaisuke Akatsuka <daisuke@mozilla-japan.org>
Sat, 02 Apr 2016 18:25:02 +0900
changeset 291526 b52399acb450dcc2474172c6c8e53ec6a330e216
parent 291525 f7eef7358c99b93677fdd356c0d4cdf1a328f9fe
child 291527 2effa07d02e114b9988cec11e443ce2ab79264c9
push id19656
push usergwagner@mozilla.com
push dateMon, 04 Apr 2016 13:43:23 +0000
treeherderb2g-inbound@e99061fde28a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbirtles
bugs1244633
milestone48.0a1
Bug 1244633 - Part 1: implement AnimationEffectTiming delay. r=birtles MozReview-Commit-ID: atZbBx3dTd
dom/animation/AnimationEffectTiming.cpp
--- a/dom/animation/AnimationEffectTiming.cpp
+++ b/dom/animation/AnimationEffectTiming.cpp
@@ -26,17 +26,23 @@ PostSpecifiedTimingUpdated(KeyframeEffec
   if (aEffect) {
     aEffect->NotifySpecifiedTimingUpdated();
   }
 }
 
 void
 AnimationEffectTiming::SetDelay(double aDelay)
 {
-  // TODO: Bug 1244633 - implement AnimationEffectTiming delay
+  TimeDuration delay = TimeDuration::FromMilliseconds(aDelay);
+  if (mTiming.mDelay == delay) {
+    return;
+  }
+  mTiming.mDelay = delay;
+
+  PostSpecifiedTimingUpdated(mEffect);
 }
 
 void
 AnimationEffectTiming::SetEndDelay(double aEndDelay)
 {
   TimeDuration endDelay = TimeDuration::FromMilliseconds(aEndDelay);
   if (mTiming.mEndDelay == endDelay) {
     return;