| 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 // AnimationPlayers which have animations targeting this element. | 69 // AnimationPlayers which have animations targeting this element. |
| 70 AnimationPlayerCountedSet& players() { return m_players; } | 70 AnimationPlayerCountedSet& players() { return m_players; } |
| 71 | 71 |
| 72 bool isEmpty() const { return m_defaultStack.isEmpty() && m_cssAnimations.is
Empty() && m_players.isEmpty(); } | 72 bool isEmpty() const { return m_defaultStack.isEmpty() && m_cssAnimations.is
Empty() && m_players.isEmpty(); } |
| 73 | 73 |
| 74 void cancelAnimationOnCompositor(); | 74 void cancelAnimationOnCompositor(); |
| 75 | 75 |
| 76 void updateAnimationFlags(RenderStyle&); | 76 void updateAnimationFlags(RenderStyle&); |
| 77 void setAnimationStyleChange(bool animationStyleChange) { m_animationStyleCh
ange = animationStyleChange; } | 77 void setAnimationStyleChange(bool animationStyleChange) { m_animationStyleCh
ange = animationStyleChange; } |
| 78 | 78 |
| 79 #if !ENABLE(OILPAN) | |
| 80 void addAnimation(Animation* animation) { m_animations.append(animation); } | 79 void addAnimation(Animation* animation) { m_animations.append(animation); } |
| 81 void notifyAnimationDestroyed(Animation* animation) { m_animations.remove(m_
animations.find(animation)); } | 80 void notifyAnimationDestroyed(Animation* animation) { m_animations.remove(m_
animations.find(animation)); } |
| 82 #endif | |
| 83 | 81 |
| 84 void trace(Visitor*); | 82 void trace(Visitor*); |
| 85 | 83 |
| 86 private: | 84 private: |
| 87 bool isAnimationStyleChange() const { return m_animationStyleChange; } | 85 bool isAnimationStyleChange() const { return m_animationStyleChange; } |
| 88 | 86 |
| 89 AnimationStack m_defaultStack; | 87 AnimationStack m_defaultStack; |
| 90 CSSAnimations m_cssAnimations; | 88 CSSAnimations m_cssAnimations; |
| 91 AnimationPlayerCountedSet m_players; | 89 AnimationPlayerCountedSet m_players; |
| 92 bool m_animationStyleChange; | 90 bool m_animationStyleChange; |
| 93 | 91 |
| 94 #if !ENABLE(OILPAN) | 92 // This is to avoid a reference cycle that keeps Elements alive. |
| 95 // FIXME: Oilpan: This is to avoid a reference cycle that keeps Elements ali
ve | |
| 96 // and won't be needed once the Node hierarchy becomes traceable. | |
| 97 Vector<Animation*> m_animations; | 93 Vector<Animation*> m_animations; |
| 98 #endif | |
| 99 | 94 |
| 100 // CSSAnimations checks if a style change is due to animation. | 95 // CSSAnimations checks if a style change is due to animation. |
| 101 friend class CSSAnimations; | 96 friend class CSSAnimations; |
| 102 }; | 97 }; |
| 103 | 98 |
| 104 } // namespace blink | 99 } // namespace blink |
| 105 | 100 |
| 106 #endif | 101 #endif |
| OLD | NEW |