Bug 1244642 - Implement AnimationEffectTiming.direction r=hiro
authorRyo Kato <foobar094@gmail.com>
Sat, 26 Mar 2016 16:20:25 +0900
changeset 290696 b51b8d9f8337666436cabe9f3a70727d89904464
parent 290695 abdfb47efd9a5252fce5566fc4dc152e501ee49a
child 290697 e8e94146b659519531e03387e470d0ed788628ad
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)
reviewershiro
bugs1244642
milestone48.0a1
Bug 1244642 - Implement AnimationEffectTiming.direction r=hiro MozReview-Commit-ID: I8t011JVGBb
dom/animation/AnimationEffectTiming.cpp
--- a/dom/animation/AnimationEffectTiming.cpp
+++ b/dom/animation/AnimationEffectTiming.cpp
@@ -104,17 +104,23 @@ AnimationEffectTiming::SetDuration(const
   mTiming.mDuration = newDuration;
 
   PostSpecifiedTimingUpdated(mEffect);
 }
 
 void
 AnimationEffectTiming::SetDirection(const PlaybackDirection& aDirection)
 {
-  // TODO: Bug 1244642 - implement AnimationEffectTiming direction
+  if (mTiming.mDirection == aDirection) {
+    return;
+  }
+
+  mTiming.mDirection = aDirection;
+
+  PostSpecifiedTimingUpdated(mEffect);
 }
 
 void
 AnimationEffectTiming::SetEasing(const nsAString& aEasing, ErrorResult& aRv)
 {
   // TODO: Bug 1244643 - implement AnimationEffectTiming easing
 }