| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "core/events/AnimationPlayerEvent.h" | |
| 6 | |
| 7 namespace blink { | |
| 8 | |
| 9 AnimationPlayerEvent::AnimationPlayerEvent(const AtomicString& type, double curr
entTime, double timelineTime) | |
| 10 : Event(type, false, false) | |
| 11 , m_currentTime(currentTime) | |
| 12 , m_timelineTime(timelineTime) | |
| 13 { | |
| 14 } | |
| 15 | |
| 16 AnimationPlayerEvent::AnimationPlayerEvent(const AtomicString& type, const Anima
tionPlayerEventInit& initializer) | |
| 17 : Event(type, initializer) | |
| 18 , m_currentTime(0.0) | |
| 19 , m_timelineTime(0.0) | |
| 20 { | |
| 21 if (initializer.hasCurrentTime()) | |
| 22 m_currentTime = initializer.currentTime(); | |
| 23 if (initializer.hasTimelineTime()) | |
| 24 m_timelineTime = initializer.timelineTime(); | |
| 25 } | |
| 26 | |
| 27 AnimationPlayerEvent::~AnimationPlayerEvent() | |
| 28 { | |
| 29 } | |
| 30 | |
| 31 double AnimationPlayerEvent::currentTime(bool& isNull) const | |
| 32 { | |
| 33 double result = currentTime(); | |
| 34 isNull = std::isnan(result); | |
| 35 return result; | |
| 36 } | |
| 37 | |
| 38 double AnimationPlayerEvent::currentTime() const | |
| 39 { | |
| 40 return m_currentTime; | |
| 41 } | |
| 42 | |
| 43 double AnimationPlayerEvent::timelineTime() const | |
| 44 { | |
| 45 return m_timelineTime; | |
| 46 } | |
| 47 | |
| 48 const AtomicString& AnimationPlayerEvent::interfaceName() const | |
| 49 { | |
| 50 return EventNames::AnimationPlayerEvent; | |
| 51 } | |
| 52 | |
| 53 DEFINE_TRACE(AnimationPlayerEvent) | |
| 54 { | |
| 55 Event::trace(visitor); | |
| 56 } | |
| 57 | |
| 58 } // namespace blink | |
| OLD | NEW |