Chromium Code Reviews| 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 25 matching lines...) Expand all Loading... | |
| 36 #include "core/dom/Element.h" | 36 #include "core/dom/Element.h" | 
| 37 | 37 | 
| 38 namespace WebCore { | 38 namespace WebCore { | 
| 39 | 39 | 
| 40 PassRefPtr<Animation> Animation::create(PassRefPtr<Element> target, PassRefPtr<A nimationEffect> effect, const Timing& timing) | 40 PassRefPtr<Animation> Animation::create(PassRefPtr<Element> target, PassRefPtr<A nimationEffect> effect, const Timing& timing) | 
| 41 { | 41 { | 
| 42 return adoptRef(new Animation(target, effect, timing)); | 42 return adoptRef(new Animation(target, effect, timing)); | 
| 43 } | 43 } | 
| 44 | 44 | 
| 45 Animation::Animation(PassRefPtr<Element> target, PassRefPtr<AnimationEffect> eff ect, const Timing& timing) | 45 Animation::Animation(PassRefPtr<Element> target, PassRefPtr<AnimationEffect> eff ect, const Timing& timing) | 
| 46 : TimedItem(timing) | 46 : TimedItem(timing, nullptr) | 
| 
 
pdr.
2013/08/01 21:11:16
Would it be useful to change the TimedItem to use
 
dstockwell
2013/08/02 00:23:26
Done.
 
 | |
| 47 , m_target(target) | 47 , m_target(target) | 
| 48 , m_effect(effect) | 48 , m_effect(effect) | 
| 49 , m_activeInAnimationStack(false) | 49 , m_activeInAnimationStack(false) | 
| 50 { | 50 { | 
| 51 } | 51 } | 
| 52 | 52 | 
| 53 void Animation::willDetach() | 53 void Animation::willDetach() | 
| 54 { | 54 { | 
| 55 if (m_activeInAnimationStack) | 55 if (m_activeInAnimationStack) | 
| 56 clearEffects(); | 56 clearEffects(); | 
| (...skipping 27 matching lines...) Expand all Loading... | |
| 84 void Animation::updateChildrenAndEffects(bool wasInEffect) const | 84 void Animation::updateChildrenAndEffects(bool wasInEffect) const | 
| 85 { | 85 { | 
| 86 ASSERT(m_activeInAnimationStack == wasInEffect); | 86 ASSERT(m_activeInAnimationStack == wasInEffect); | 
| 87 if (isInEffect()) | 87 if (isInEffect()) | 
| 88 const_cast<Animation*>(this)->applyEffects(wasInEffect); | 88 const_cast<Animation*>(this)->applyEffects(wasInEffect); | 
| 89 else if (wasInEffect) | 89 else if (wasInEffect) | 
| 90 const_cast<Animation*>(this)->clearEffects(); | 90 const_cast<Animation*>(this)->clearEffects(); | 
| 91 } | 91 } | 
| 92 | 92 | 
| 93 } // namespace WebCore | 93 } // namespace WebCore | 
| OLD | NEW |