Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(139)

Side by Side Diff: Source/core/svg/animation/SMILTimeContainer.h

Issue 802143002: AnimationPolicy setting is applied to SVG animation. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Move code to SMILTimeContainer and add LayoutTests Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2008 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 // Scheduled a wakeup to trigger an animation frame. 81 // Scheduled a wakeup to trigger an animation frame.
82 FutureAnimationFrame, 82 FutureAnimationFrame,
83 // Scheduled a animation frame for continuous update. 83 // Scheduled a animation frame for continuous update.
84 AnimationFrame 84 AnimationFrame
85 }; 85 };
86 86
87 bool isTimelineRunning() const; 87 bool isTimelineRunning() const;
88 void scheduleAnimationFrame(SMILTime fireTime); 88 void scheduleAnimationFrame(SMILTime fireTime);
89 void cancelAnimationFrame(); 89 void cancelAnimationFrame();
90 void wakeupTimerFired(Timer<SMILTimeContainer>*); 90 void wakeupTimerFired(Timer<SMILTimeContainer>*);
91 void animationPolicyOnceTimerFired(Timer<SMILTimeContainer>*);
91 void updateAnimationsAndScheduleFrameIfNeeded(SMILTime elapsed, bool seekToT ime = false); 92 void updateAnimationsAndScheduleFrameIfNeeded(SMILTime elapsed, bool seekToT ime = false);
92 SMILTime updateAnimations(SMILTime elapsed, bool seekToTime = false); 93 SMILTime updateAnimations(SMILTime elapsed, bool seekToTime = false);
93 void serviceOnNextFrame(); 94 void serviceOnNextFrame();
94 void scheduleWakeUp(double delayTime, FrameSchedulingState); 95 void scheduleWakeUp(double delayTime, FrameSchedulingState);
95 bool hasPendingSynchronization() const; 96 bool hasPendingSynchronization() const;
96 97
97 void updateDocumentOrderIndexes(); 98 void updateDocumentOrderIndexes();
98 double lastResumeTime() const { return m_resumeTime ? m_resumeTime : m_begin Time; } 99 double lastResumeTime() const { return m_resumeTime ? m_resumeTime : m_begin Time; }
99 100
100 Document& document() const; 101 Document& document() const;
101 double currentTime() const; 102 double currentTime() const;
102 103
103 double m_beginTime; 104 double m_beginTime;
104 double m_pauseTime; 105 double m_pauseTime;
105 double m_resumeTime; 106 double m_resumeTime;
106 double m_accumulatedActiveTime; 107 double m_accumulatedActiveTime;
107 double m_presetStartTime; 108 double m_presetStartTime;
108 109
109 FrameSchedulingState m_frameSchedulingState; 110 FrameSchedulingState m_frameSchedulingState;
110 bool m_documentOrderIndexesDirty; 111 bool m_documentOrderIndexesDirty;
111 112
112 Timer<SMILTimeContainer> m_wakeupTimer; 113 Timer<SMILTimeContainer> m_wakeupTimer;
114 Timer<SMILTimeContainer> m_animationPolicyOnceTimer;
113 115
114 using ElementAttributePair = pair<RawPtrWillBeWeakMember<SVGElement>, Qualif iedName>; 116 using ElementAttributePair = pair<RawPtrWillBeWeakMember<SVGElement>, Qualif iedName>;
115 using AnimationsLinkedHashSet = WillBeHeapLinkedHashSet<RawPtrWillBeWeakMemb er<SVGSMILElement>>; 117 using AnimationsLinkedHashSet = WillBeHeapLinkedHashSet<RawPtrWillBeWeakMemb er<SVGSMILElement>>;
116 using GroupedAnimationsMap = WillBeHeapHashMap<ElementAttributePair, OwnPtrW illBeMember<AnimationsLinkedHashSet>>; 118 using GroupedAnimationsMap = WillBeHeapHashMap<ElementAttributePair, OwnPtrW illBeMember<AnimationsLinkedHashSet>>;
117 GroupedAnimationsMap m_scheduledAnimations; 119 GroupedAnimationsMap m_scheduledAnimations;
118 120
119 SVGSVGElement& m_ownerSVGElement; 121 SVGSVGElement& m_ownerSVGElement;
120 122
121 #if ENABLE(ASSERT) 123 #if ENABLE(ASSERT)
122 bool m_preventScheduledAnimationsChanges; 124 bool m_preventScheduledAnimationsChanges;
123 #endif 125 #endif
124 }; 126 };
125 } 127 }
126 128
127 #endif // SMILTimeContainer_h 129 #endif // SMILTimeContainer_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698