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
--- 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*