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 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 } | 299 } |
300 | 300 |
301 const bool isPaused = CSSTimingData::getRepeated(animationData->play
StateList(), i) == AnimPlayStatePaused; | 301 const bool isPaused = CSSTimingData::getRepeated(animationData->play
StateList(), i) == AnimPlayStatePaused; |
302 | 302 |
303 Timing timing = animationData->convertToTiming(i); | 303 Timing timing = animationData->convertToTiming(i); |
304 Timing specifiedTiming = timing; | 304 Timing specifiedTiming = timing; |
305 RefPtr<TimingFunction> keyframeTimingFunction = timing.timingFunctio
n; | 305 RefPtr<TimingFunction> keyframeTimingFunction = timing.timingFunctio
n; |
306 timing.timingFunction = Timing::defaults().timingFunction; | 306 timing.timingFunction = Timing::defaults().timingFunction; |
307 | 307 |
308 StyleRuleKeyframes* keyframesRule = resolver->findKeyframesRule(elem
entForScoping, name); | 308 StyleRuleKeyframes* keyframesRule = resolver->findKeyframesRule(elem
entForScoping, name); |
309 if (!keyframesRule) { | 309 if (!keyframesRule) |
310 element.document().styleEngine().setHasUnresolvedKeyframesRule()
; | |
311 continue; // Cancel the animation if there's no style rule for i
t. | 310 continue; // Cancel the animation if there's no style rule for i
t. |
312 } | |
313 | 311 |
314 const RunningAnimation* existingAnimation = nullptr; | 312 const RunningAnimation* existingAnimation = nullptr; |
315 size_t existingAnimationIndex = 0; | 313 size_t existingAnimationIndex = 0; |
316 | 314 |
317 if (cssAnimations) { | 315 if (cssAnimations) { |
318 for (size_t i = 0; i < cssAnimations->m_runningAnimations.size()
; i++) { | 316 for (size_t i = 0; i < cssAnimations->m_runningAnimations.size()
; i++) { |
319 const RunningAnimation& runningAnimation = *cssAnimations->m
_runningAnimations[i]; | 317 const RunningAnimation& runningAnimation = *cssAnimations->m
_runningAnimations[i]; |
320 if (runningAnimation.name == name && runningAnimation.nameIn
dex == nameIndex) { | 318 if (runningAnimation.name == name && runningAnimation.nameIn
dex == nameIndex) { |
321 existingAnimation = &runningAnimation; | 319 existingAnimation = &runningAnimation; |
322 existingAnimationIndex = i; | 320 existingAnimationIndex = i; |
(...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
897 } | 895 } |
898 | 896 |
899 DEFINE_TRACE(CSSAnimations) | 897 DEFINE_TRACE(CSSAnimations) |
900 { | 898 { |
901 visitor->trace(m_transitions); | 899 visitor->trace(m_transitions); |
902 visitor->trace(m_pendingUpdate); | 900 visitor->trace(m_pendingUpdate); |
903 visitor->trace(m_runningAnimations); | 901 visitor->trace(m_runningAnimations); |
904 } | 902 } |
905 | 903 |
906 } // namespace blink | 904 } // namespace blink |
OLD | NEW |