| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 | 103 |
| 104 ScriptPromise finished(ScriptState*); | 104 ScriptPromise finished(ScriptState*); |
| 105 ScriptPromise ready(ScriptState*); | 105 ScriptPromise ready(ScriptState*); |
| 106 | 106 |
| 107 bool playing() const { return !(playStateInternal() == Idle || limited() ||
m_paused || m_isPausedForTesting); } | 107 bool playing() const { return !(playStateInternal() == Idle || limited() ||
m_paused || m_isPausedForTesting); } |
| 108 bool limited() const { return limited(currentTimeInternal()); } | 108 bool limited() const { return limited(currentTimeInternal()); } |
| 109 bool finishedInternal() const { return m_finished; } | 109 bool finishedInternal() const { return m_finished; } |
| 110 | 110 |
| 111 DEFINE_ATTRIBUTE_EVENT_LISTENER(finish); | 111 DEFINE_ATTRIBUTE_EVENT_LISTENER(finish); |
| 112 | 112 |
| 113 virtual const AtomicString& interfaceName() const override; | 113 const AtomicString& interfaceName() const override; |
| 114 virtual ExecutionContext* executionContext() const override; | 114 ExecutionContext* executionContext() const override; |
| 115 virtual bool hasPendingActivity() const override; | 115 bool hasPendingActivity() const override; |
| 116 virtual void stop() override; | 116 void stop() override; |
| 117 virtual bool dispatchEvent(PassRefPtrWillBeRawPtr<Event>) override; | 117 bool dispatchEvent(PassRefPtrWillBeRawPtr<Event>) override; |
| 118 | 118 |
| 119 double playbackRate() const; | 119 double playbackRate() const; |
| 120 void setPlaybackRate(double); | 120 void setPlaybackRate(double); |
| 121 const AnimationTimeline* timeline() const { return m_timeline; } | 121 const AnimationTimeline* timeline() const { return m_timeline; } |
| 122 AnimationTimeline* timeline() { return m_timeline; } | 122 AnimationTimeline* timeline() { return m_timeline; } |
| 123 | 123 |
| 124 #if !ENABLE(OILPAN) | 124 #if !ENABLE(OILPAN) |
| 125 void detachFromTimeline(); | 125 void detachFromTimeline(); |
| 126 #endif | 126 #endif |
| 127 | 127 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 void postCommit(double timelineTime); | 170 void postCommit(double timelineTime); |
| 171 | 171 |
| 172 unsigned sequenceNumber() const { return m_sequenceNumber; } | 172 unsigned sequenceNumber() const { return m_sequenceNumber; } |
| 173 int compositorGroup() const { return m_compositorGroup; } | 173 int compositorGroup() const { return m_compositorGroup; } |
| 174 | 174 |
| 175 static bool hasLowerPriority(const Animation* animation1, const Animation* a
nimation2) | 175 static bool hasLowerPriority(const Animation* animation1, const Animation* a
nimation2) |
| 176 { | 176 { |
| 177 return animation1->sequenceNumber() < animation2->sequenceNumber(); | 177 return animation1->sequenceNumber() < animation2->sequenceNumber(); |
| 178 } | 178 } |
| 179 | 179 |
| 180 virtual bool addEventListener(const AtomicString& eventType, PassRefPtr<Even
tListener>, bool useCapture = false) override; | 180 bool addEventListener(const AtomicString& eventType, PassRefPtr<EventListene
r>, bool useCapture = false) override; |
| 181 | 181 |
| 182 DECLARE_VIRTUAL_TRACE(); | 182 DECLARE_VIRTUAL_TRACE(); |
| 183 | 183 |
| 184 private: | 184 private: |
| 185 Animation(ExecutionContext*, AnimationTimeline&, AnimationEffect*); | 185 Animation(ExecutionContext*, AnimationTimeline&, AnimationEffect*); |
| 186 | 186 |
| 187 void clearOutdated(); | 187 void clearOutdated(); |
| 188 | 188 |
| 189 double effectEnd() const; | 189 double effectEnd() const; |
| 190 bool limited(double currentTime) const; | 190 bool limited(double currentTime) const; |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 | 295 |
| 296 OwnPtr<WebCompositorAnimationPlayer> m_compositorPlayer; | 296 OwnPtr<WebCompositorAnimationPlayer> m_compositorPlayer; |
| 297 | 297 |
| 298 bool m_currentTimePending; | 298 bool m_currentTimePending; |
| 299 bool m_stateIsBeingUpdated; | 299 bool m_stateIsBeingUpdated; |
| 300 }; | 300 }; |
| 301 | 301 |
| 302 } // namespace blink | 302 } // namespace blink |
| 303 | 303 |
| 304 #endif // Animation_h | 304 #endif // Animation_h |
| OLD | NEW |