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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 { | 44 { |
45 if (fillMode != Timing::FillModeAuto) | 45 if (fillMode != Timing::FillModeAuto) |
46 return fillMode; | 46 return fillMode; |
47 if (isAnimation) | 47 if (isAnimation) |
48 return Timing::FillModeNone; | 48 return Timing::FillModeNone; |
49 return Timing::FillModeBoth; | 49 return Timing::FillModeBoth; |
50 } | 50 } |
51 | 51 |
52 } // namespace | 52 } // namespace |
53 | 53 |
54 AnimationEffect::AnimationEffect(const Timing& timing, PassOwnPtrWillBeRawPtr<Ev
entDelegate> eventDelegate) | 54 AnimationEffect::AnimationEffect(const Timing& timing, EventDelegate* eventDeleg
ate) |
55 : m_parent(nullptr) | 55 : m_parent(nullptr) |
56 , m_startTime(0) | 56 , m_startTime(0) |
57 , m_animation(nullptr) | 57 , m_animation(nullptr) |
58 , m_timing(timing) | 58 , m_timing(timing) |
59 , m_eventDelegate(eventDelegate) | 59 , m_eventDelegate(eventDelegate) |
60 , m_calculated() | 60 , m_calculated() |
61 , m_needsUpdate(true) | 61 , m_needsUpdate(true) |
62 , m_lastUpdateTime(nullValue()) | 62 , m_lastUpdateTime(nullValue()) |
63 { | 63 { |
64 m_timing.assertValid(); | 64 m_timing.assertValid(); |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 const AnimationEffect::CalculatedTiming& AnimationEffect::ensureCalculated() con
st | 214 const AnimationEffect::CalculatedTiming& AnimationEffect::ensureCalculated() con
st |
215 { | 215 { |
216 if (!m_animation) | 216 if (!m_animation) |
217 return m_calculated; | 217 return m_calculated; |
218 if (m_animation->outdated()) | 218 if (m_animation->outdated()) |
219 m_animation->update(TimingUpdateOnDemand); | 219 m_animation->update(TimingUpdateOnDemand); |
220 ASSERT(!m_animation->outdated()); | 220 ASSERT(!m_animation->outdated()); |
221 return m_calculated; | 221 return m_calculated; |
222 } | 222 } |
223 | 223 |
224 PassRefPtrWillBeRawPtr<AnimationEffectTiming> AnimationEffect::timing() | 224 AnimationEffectTiming* AnimationEffect::timing() |
225 { | 225 { |
226 return AnimationEffectTiming::create(this); | 226 return AnimationEffectTiming::create(this); |
227 } | 227 } |
228 | 228 |
229 DEFINE_TRACE(AnimationEffect) | 229 DEFINE_TRACE(AnimationEffect) |
230 { | 230 { |
231 visitor->trace(m_parent); | 231 visitor->trace(m_parent); |
232 visitor->trace(m_animation); | 232 visitor->trace(m_animation); |
233 visitor->trace(m_eventDelegate); | 233 visitor->trace(m_eventDelegate); |
234 } | 234 } |
235 | 235 |
236 } // namespace blink | 236 } // namespace blink |
OLD | NEW |