| 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 | |
| 129 void AnimationEffect::computedTiming(ComputedTimingProperties& computedTiming) | 98 void AnimationEffect::computedTiming(ComputedTimingProperties& computedTiming) |
| 130 { | 99 { |
| 131 // ComputedTimingProperties members. | 100 // ComputedTimingProperties members. |
| 132 computedTiming.setStartTime(0); | 101 computedTiming.setStartTime(0); |
| 133 computedTiming.setEndTime(endTimeInternal() * 1000); | 102 computedTiming.setEndTime(endTimeInternal() * 1000); |
| 134 computedTiming.setActiveDuration(activeDurationInternal() * 1000); | 103 computedTiming.setActiveDuration(activeDurationInternal() * 1000); |
| 135 | 104 |
| 136 // FIXME: These should be null if not in effect, but current dictionary API | 105 // FIXME: These should be null if not in effect, but current dictionary API |
| 137 // will treat these as undefined. | 106 // will treat these as undefined. |
| 138 if (ensureCalculated().isInEffect) { | 107 if (ensureCalculated().isInEffect) { |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 return AnimationEffectTiming::create(this); | 224 return AnimationEffectTiming::create(this); |
| 256 } | 225 } |
| 257 | 226 |
| 258 DEFINE_TRACE(AnimationEffect) | 227 DEFINE_TRACE(AnimationEffect) |
| 259 { | 228 { |
| 260 visitor->trace(m_animation); | 229 visitor->trace(m_animation); |
| 261 visitor->trace(m_eventDelegate); | 230 visitor->trace(m_eventDelegate); |
| 262 } | 231 } |
| 263 | 232 |
| 264 } // namespace blink | 233 } // namespace blink |
| OLD | NEW |