| 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 void AnimationEffect::updateSpecifiedTiming(const Timing& timing) | 88 void AnimationEffect::updateSpecifiedTiming(const Timing& timing) |
| 89 { | 89 { |
| 90 // FIXME: Test whether the timing is actually different? | 90 // FIXME: Test whether the timing is actually different? |
| 91 m_timing = timing; | 91 m_timing = timing; |
| 92 invalidate(); | 92 invalidate(); |
| 93 if (m_animation) | 93 if (m_animation) |
| 94 m_animation->setOutdated(); | 94 m_animation->setOutdated(); |
| 95 specifiedTimingChanged(); | 95 specifiedTimingChanged(); |
| 96 } | 96 } |
| 97 | 97 |
| 98 bool AnimationEffect::requiresIterationEvents() const |
| 99 { |
| 100 return m_eventDelegate && m_eventDelegate->requiresIterationEvents(*this); |
| 101 } |
| 102 |
| 103 void AnimationEffect::clearEventDelegate() |
| 104 { |
| 105 m_eventDelegate = nullptr; |
| 106 } |
| 107 |
| 108 void AnimationEffect::attach(Animation* animation) |
| 109 { |
| 110 m_animation = animation; |
| 111 } |
| 112 |
| 113 void AnimationEffect::detach() |
| 114 { |
| 115 ASSERT(m_animation); |
| 116 m_animation = nullptr; |
| 117 } |
| 118 |
| 119 const Animation* AnimationEffect::animation() const |
| 120 { |
| 121 return m_animation; |
| 122 } |
| 123 |
| 124 Animation* AnimationEffect::animation() |
| 125 { |
| 126 return m_animation; |
| 127 } |
| 128 |
| 98 void AnimationEffect::computedTiming(ComputedTimingProperties& computedTiming) | 129 void AnimationEffect::computedTiming(ComputedTimingProperties& computedTiming) |
| 99 { | 130 { |
| 100 // ComputedTimingProperties members. | 131 // ComputedTimingProperties members. |
| 101 computedTiming.setStartTime(0); | 132 computedTiming.setStartTime(0); |
| 102 computedTiming.setEndTime(endTimeInternal() * 1000); | 133 computedTiming.setEndTime(endTimeInternal() * 1000); |
| 103 computedTiming.setActiveDuration(activeDurationInternal() * 1000); | 134 computedTiming.setActiveDuration(activeDurationInternal() * 1000); |
| 104 | 135 |
| 105 // FIXME: These should be null if not in effect, but current dictionary API | 136 // FIXME: These should be null if not in effect, but current dictionary API |
| 106 // will treat these as undefined. | 137 // will treat these as undefined. |
| 107 if (ensureCalculated().isInEffect) { | 138 if (ensureCalculated().isInEffect) { |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 return AnimationEffectTiming::create(this); | 255 return AnimationEffectTiming::create(this); |
| 225 } | 256 } |
| 226 | 257 |
| 227 DEFINE_TRACE(AnimationEffect) | 258 DEFINE_TRACE(AnimationEffect) |
| 228 { | 259 { |
| 229 visitor->trace(m_animation); | 260 visitor->trace(m_animation); |
| 230 visitor->trace(m_eventDelegate); | 261 visitor->trace(m_eventDelegate); |
| 231 } | 262 } |
| 232 | 263 |
| 233 } // namespace blink | 264 } // namespace blink |
| OLD | NEW |