Bug 1244633 - Part 1: implement AnimationEffectTiming delay. r=birtles draft
authorDaisuke Akatsuka <daisuke@mozilla-japan.org>
Wed, 30 Mar 2016 09:53:57 +0900
changeset 345685 71eeb4e0ec13c443ec54d28003f52b15d22a6503
parent 345496 d5d53a3b4e50b94cdf85d20690526e5a00d5b63e
child 345686 ce30dc427a6aab24255d233cb384897a500d86e7
push id14137
push userbmo:daisuke@mozilla-japan.org
push dateWed, 30 Mar 2016 02:12:49 +0000
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;