| 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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 inactive.remove(animationName.impl()); | 182 inactive.remove(animationName.impl()); |
| 183 continue; | 183 continue; |
| 184 } | 184 } |
| 185 | 185 |
| 186 KeyframeAnimationEffect::KeyframeVector keyframes; | 186 KeyframeAnimationEffect::KeyframeVector keyframes; |
| 187 element->document()->styleResolver()->resolveKeyframes(element, styl
e, animationName.impl(), keyframes); | 187 element->document()->styleResolver()->resolveKeyframes(element, styl
e, animationName.impl(), keyframes); |
| 188 if (!keyframes.isEmpty()) { | 188 if (!keyframes.isEmpty()) { |
| 189 Timing timing; | 189 Timing timing; |
| 190 timingFromAnimationData(animationData, timing); | 190 timingFromAnimationData(animationData, timing); |
| 191 OwnPtr<CSSAnimations::EventDelegate> eventDelegate = adoptPtr(ne
w EventDelegate(element, animationName)); | 191 OwnPtr<CSSAnimations::EventDelegate> eventDelegate = adoptPtr(ne
w EventDelegate(element, animationName)); |
| 192 ASSERT(!isNull(element->document()->timeline()->currentTime())); |
| 192 // FIXME: crbug.com/268791 - Keyframes are already normalized, p
erhaps there should be a flag on KeyframeAnimationEffect to skip normalization. | 193 // FIXME: crbug.com/268791 - Keyframes are already normalized, p
erhaps there should be a flag on KeyframeAnimationEffect to skip normalization. |
| 193 m_animations.set(animationName.impl(), element->document()->time
line()->play( | 194 m_animations.set(animationName.impl(), element->document()->time
line()->play( |
| 194 Animation::create(element, KeyframeAnimationEffect::create(k
eyframes), timing, eventDelegate.release()).get()).get()); | 195 Animation::create(element, KeyframeAnimationEffect::create(k
eyframes), timing, eventDelegate.release()).get()).get()); |
| 195 } | 196 } |
| 196 } | 197 } |
| 197 } | 198 } |
| 198 | 199 |
| 199 for (HashSet<StringImpl*>::const_iterator iter = inactive.begin(); iter != i
nactive.end(); ++iter) | 200 for (HashSet<StringImpl*>::const_iterator iter = inactive.begin(); iter != i
nactive.end(); ++iter) |
| 200 m_animations.take(*iter)->cancel(); | 201 m_animations.take(*iter)->cancel(); |
| 201 } | 202 } |
| (...skipping 28 matching lines...) Expand all Loading... |
| 230 maybeDispatch(Document::ANIMATIONITERATION_LISTENER, eventNames().webkit
AnimationIterationEvent, elapsedTime); | 231 maybeDispatch(Document::ANIMATIONITERATION_LISTENER, eventNames().webkit
AnimationIterationEvent, elapsedTime); |
| 231 return; | 232 return; |
| 232 } | 233 } |
| 233 if (wasInPlay && !isInPlay) { | 234 if (wasInPlay && !isInPlay) { |
| 234 maybeDispatch(Document::ANIMATIONEND_LISTENER, eventNames().webkitAnimat
ionEndEvent, elapsedTime); | 235 maybeDispatch(Document::ANIMATIONEND_LISTENER, eventNames().webkitAnimat
ionEndEvent, elapsedTime); |
| 235 return; | 236 return; |
| 236 } | 237 } |
| 237 } | 238 } |
| 238 | 239 |
| 239 } // namespace WebCore | 240 } // namespace WebCore |
| OLD | NEW |