Bug 1223658 - Part 5: Add a function to check active duration is zero. r?birtles draft
authorHiroyuki Ikezoe <hiikezoe@mozilla-japan.org>
Tue, 10 May 2016 18:28:58 +0900
changeset 365228 6257da774970096db4d01e85aa4d7240d9b7d401
parent 365227 f5e2e7fdaff0b81954828b9703c0e0924bab6644
child 365229 37ef5c0b5533994492225b6a803d527be1605ad2
push id17675
push userhiikezoe@mozilla-japan.org
push dateTue, 10 May 2016 09:29:14 +0000
reviewersbirtles
bugs1223658
milestone49.0a1
Bug 1223658 - Part 5: Add a function to check active duration is zero. r?birtles We are going to pass animations to the compositor in before phase but not to pass when active duration is zero. To distinguish this state we need a new function to check that the active duration is zero. MozReview-Commit-ID: HYAmjNGdt5W
dom/animation/KeyframeEffect.h
--- a/dom/animation/KeyframeEffect.h
+++ b/dom/animation/KeyframeEffect.h
@@ -271,16 +271,20 @@ public:
   }
 
   void
   GetComputedTimingAsDict(ComputedTimingProperties& aRetVal) const override;
 
   bool IsInPlay() const;
   bool IsCurrent() const;
   bool IsInEffect() const;
+  bool IsActiveDurationZero() const
+  {
+    return SpecifiedTiming().ActiveDuration() == StickyTimeDuration(0);
+  }
 
   void SetAnimation(Animation* aAnimation);
   Animation* GetAnimation() const { return mAnimation; }
 
   void SetFrames(JSContext* aContext, JS::Handle<JSObject*> aFrames,
                  ErrorResult& aRv);
   void SetFrames(nsTArray<Keyframe>&& aFrames, nsStyleContext* aStyleContext);
   const AnimationProperty*