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