| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "config.h" | 5 #include "config.h" |
| 6 #include "core/events/AnimationPlayerEvent.h" | 6 #include "core/events/AnimationPlayerEvent.h" |
| 7 | 7 |
| 8 namespace blink { | 8 namespace blink { |
| 9 | 9 |
| 10 AnimationPlayerEventInit::AnimationPlayerEventInit() | 10 AnimationPlayerEventInit::AnimationPlayerEventInit() |
| 11 : currentTime(0.0) | 11 : currentTime(0.0) |
| 12 , timelineTime(0.0) | 12 , timelineTime(0.0) |
| 13 { | 13 { |
| 14 } | 14 } |
| 15 | 15 |
| 16 AnimationPlayerEvent::AnimationPlayerEvent() | 16 AnimationPlayerEvent::AnimationPlayerEvent() |
| 17 : m_currentTime(0.0) | 17 : m_currentTime(0.0) |
| 18 , m_timelineTime(0.0) | 18 , m_timelineTime(0.0) |
| 19 { | 19 { |
| 20 ScriptWrappable::init(this); | |
| 21 } | 20 } |
| 22 | 21 |
| 23 AnimationPlayerEvent::AnimationPlayerEvent(const AtomicString& type, double curr
entTime, double timelineTime) | 22 AnimationPlayerEvent::AnimationPlayerEvent(const AtomicString& type, double curr
entTime, double timelineTime) |
| 24 : Event(type, false, false) | 23 : Event(type, false, false) |
| 25 , m_currentTime(currentTime) | 24 , m_currentTime(currentTime) |
| 26 , m_timelineTime(timelineTime) | 25 , m_timelineTime(timelineTime) |
| 27 { | 26 { |
| 28 ScriptWrappable::init(this); | |
| 29 } | 27 } |
| 30 | 28 |
| 31 AnimationPlayerEvent::AnimationPlayerEvent(const AtomicString& type, const Anima
tionPlayerEventInit& initializer) | 29 AnimationPlayerEvent::AnimationPlayerEvent(const AtomicString& type, const Anima
tionPlayerEventInit& initializer) |
| 32 : Event(type, initializer) | 30 : Event(type, initializer) |
| 33 , m_currentTime(initializer.currentTime) | 31 , m_currentTime(initializer.currentTime) |
| 34 , m_timelineTime(initializer.timelineTime) | 32 , m_timelineTime(initializer.timelineTime) |
| 35 { | 33 { |
| 36 ScriptWrappable::init(this); | |
| 37 } | 34 } |
| 38 | 35 |
| 39 AnimationPlayerEvent::~AnimationPlayerEvent() | 36 AnimationPlayerEvent::~AnimationPlayerEvent() |
| 40 { | 37 { |
| 41 } | 38 } |
| 42 | 39 |
| 43 double AnimationPlayerEvent::currentTime() const | 40 double AnimationPlayerEvent::currentTime() const |
| 44 { | 41 { |
| 45 return m_currentTime; | 42 return m_currentTime; |
| 46 } | 43 } |
| 47 | 44 |
| 48 double AnimationPlayerEvent::timelineTime() const | 45 double AnimationPlayerEvent::timelineTime() const |
| 49 { | 46 { |
| 50 return m_timelineTime; | 47 return m_timelineTime; |
| 51 } | 48 } |
| 52 | 49 |
| 53 const AtomicString& AnimationPlayerEvent::interfaceName() const | 50 const AtomicString& AnimationPlayerEvent::interfaceName() const |
| 54 { | 51 { |
| 55 return EventNames::AnimationPlayerEvent; | 52 return EventNames::AnimationPlayerEvent; |
| 56 } | 53 } |
| 57 | 54 |
| 58 void AnimationPlayerEvent::trace(Visitor* visitor) | 55 void AnimationPlayerEvent::trace(Visitor* visitor) |
| 59 { | 56 { |
| 60 Event::trace(visitor); | 57 Event::trace(visitor); |
| 61 } | 58 } |
| 62 | 59 |
| 63 } // namespace blink | 60 } // namespace blink |
| OLD | NEW |