Chromium Code Reviews| Index: Source/core/svg/animation/SMILTimeContainer.h |
| diff --git a/Source/core/svg/animation/SMILTimeContainer.h b/Source/core/svg/animation/SMILTimeContainer.h |
| index 53565e99e5ecad742066aacc42bab3b10d576271..7e91dd1009eb3537c157362b3024789c5ea55540 100644 |
| --- a/Source/core/svg/animation/SMILTimeContainer.h |
| +++ b/Source/core/svg/animation/SMILTimeContainer.h |
| @@ -29,6 +29,7 @@ |
| #include "core/dom/QualifiedName.h" |
| #include "core/svg/animation/SMILTime.h" |
| #include "platform/Timer.h" |
| +#include "platform/graphics/ImageAnimationPolicy.h" |
| #include "platform/heap/Handle.h" |
| #include "wtf/HashMap.h" |
| #include "wtf/HashSet.h" |
| @@ -84,10 +85,25 @@ private: |
| AnimationFrame |
| }; |
| + enum AnimationPolicyOnceAction { |
| + // Restart OnceTimer if it's not paused. |
|
fs
2014/12/27 15:36:35
"if it's" -> "if the timeline is"
je_julie(Not used)
2014/12/28 05:50:26
Done.
|
| + RestartOnceTimerIfNotPaused, |
| + // Restart OnceTimer. |
| + RestartOnceTimer, |
| + // Cancel OnceTimer. |
| + CancelOnceTimer |
| + }; |
| + |
| + |
| bool isTimelineRunning() const; |
| void scheduleAnimationFrame(SMILTime fireTime); |
| void cancelAnimationFrame(); |
| void wakeupTimerFired(Timer<SMILTimeContainer>*); |
| + void scheduleAnimationPolicyTimer(); |
| + void cancelAnimationPolicyTimer(); |
| + void animationPolicyTimerFired(Timer<SMILTimeContainer>*); |
| + ImageAnimationPolicy animationPolicy() const; |
| + bool handleAnimationPolicy(AnimationPolicyOnceAction); |
| void updateAnimationsAndScheduleFrameIfNeeded(SMILTime elapsed, bool seekToTime = false); |
| SMILTime updateAnimations(SMILTime elapsed, bool seekToTime = false); |
| void serviceOnNextFrame(); |
| @@ -110,6 +126,7 @@ private: |
| bool m_documentOrderIndexesDirty; |
| Timer<SMILTimeContainer> m_wakeupTimer; |
| + Timer<SMILTimeContainer> m_animationPolicyOnceTimer; |
| using ElementAttributePair = pair<RawPtrWillBeWeakMember<SVGElement>, QualifiedName>; |
| using AnimationsLinkedHashSet = WillBeHeapLinkedHashSet<RawPtrWillBeWeakMember<SVGSMILElement>>; |