| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 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 17 matching lines...) Expand all Loading... |
| 28 | 28 |
| 29 namespace blink { | 29 namespace blink { |
| 30 | 30 |
| 31 AnimationEvent::AnimationEvent() | 31 AnimationEvent::AnimationEvent() |
| 32 : m_elapsedTime(0.0) | 32 : m_elapsedTime(0.0) |
| 33 { | 33 { |
| 34 } | 34 } |
| 35 | 35 |
| 36 AnimationEvent::AnimationEvent(const AtomicString& type, const AnimationEventIni
t& initializer) | 36 AnimationEvent::AnimationEvent(const AtomicString& type, const AnimationEventIni
t& initializer) |
| 37 : Event(type, initializer) | 37 : Event(type, initializer) |
| 38 , m_elapsedTime(0.0) | 38 , m_animationName(initializer.animationName()) |
| 39 , m_elapsedTime(initializer.elapsedTime()) |
| 39 { | 40 { |
| 40 if (initializer.hasAnimationName()) | |
| 41 m_animationName = initializer.animationName(); | |
| 42 if (initializer.hasElapsedTime()) | |
| 43 m_elapsedTime = initializer.elapsedTime(); | |
| 44 } | 41 } |
| 45 | 42 |
| 46 AnimationEvent::AnimationEvent(const AtomicString& type, const String& animation
Name, double elapsedTime) | 43 AnimationEvent::AnimationEvent(const AtomicString& type, const String& animation
Name, double elapsedTime) |
| 47 : Event(type, true, true) | 44 : Event(type, true, true) |
| 48 , m_animationName(animationName) | 45 , m_animationName(animationName) |
| 49 , m_elapsedTime(elapsedTime) | 46 , m_elapsedTime(elapsedTime) |
| 50 { | 47 { |
| 51 } | 48 } |
| 52 | 49 |
| 53 AnimationEvent::~AnimationEvent() | 50 AnimationEvent::~AnimationEvent() |
| (...skipping 14 matching lines...) Expand all Loading... |
| 68 { | 65 { |
| 69 return EventNames::AnimationEvent; | 66 return EventNames::AnimationEvent; |
| 70 } | 67 } |
| 71 | 68 |
| 72 DEFINE_TRACE(AnimationEvent) | 69 DEFINE_TRACE(AnimationEvent) |
| 73 { | 70 { |
| 74 Event::trace(visitor); | 71 Event::trace(visitor); |
| 75 } | 72 } |
| 76 | 73 |
| 77 } // namespace blink | 74 } // namespace blink |
| OLD | NEW |