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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 46 | 46 |
| 47 class ActiveAnimations : public NoBaseWillBeGarbageCollectedFinalized<ActiveAnim ations> { | 47 class ActiveAnimations : public NoBaseWillBeGarbageCollectedFinalized<ActiveAnim ations> { |
| 48 WTF_MAKE_NONCOPYABLE(ActiveAnimations); | 48 WTF_MAKE_NONCOPYABLE(ActiveAnimations); |
| 49 public: | 49 public: |
| 50 ActiveAnimations() | 50 ActiveAnimations() |
| 51 : m_animationStyleChange(false) | 51 : m_animationStyleChange(false) |
| 52 { | 52 { |
| 53 } | 53 } |
| 54 | 54 |
| 55 ~ActiveAnimations(); | 55 ~ActiveAnimations(); |
| 56 void dispose(); | |
| 57 | 56 |
| 58 // Animations that are currently active for this element, their effects will be applied | 57 // Animations that are currently active for this element, their effects will be applied |
| 59 // during a style recalc. CSS Transitions are included in this stack. | 58 // during a style recalc. CSS Transitions are included in this stack. |
| 60 AnimationStack& defaultStack() { return m_defaultStack; } | 59 AnimationStack& defaultStack() { return m_defaultStack; } |
| 61 // Tracks the state of active CSS Animations and Transitions. The individual animations | 60 // Tracks the state of active CSS Animations and Transitions. The individual animations |
| 62 // will also be part of the default stack, but the mapping betwen animation name and | 61 // will also be part of the default stack, but the mapping betwen animation name and |
| 63 // player is kept here. | 62 // player is kept here. |
| 64 CSSAnimations& cssAnimations() { return m_cssAnimations; } | 63 CSSAnimations& cssAnimations() { return m_cssAnimations; } |
| 65 const CSSAnimations& cssAnimations() const { return m_cssAnimations; } | 64 const CSSAnimations& cssAnimations() const { return m_cssAnimations; } |
| 66 | 65 |
| (...skipping 20 matching lines...) Expand all Loading... | |
| 87 | 86 |
| 88 AnimationStack m_defaultStack; | 87 AnimationStack m_defaultStack; |
| 89 CSSAnimations m_cssAnimations; | 88 CSSAnimations m_cssAnimations; |
| 90 AnimationPlayerCountedSet m_players; | 89 AnimationPlayerCountedSet m_players; |
| 91 bool m_animationStyleChange; | 90 bool m_animationStyleChange; |
| 92 | 91 |
| 93 // This is to avoid a reference cycle that keeps Elements alive and | 92 // This is to avoid a reference cycle that keeps Elements alive and |
| 94 // won't be needed once Element and Animation are moved to Oilpan. | 93 // won't be needed once Element and Animation are moved to Oilpan. |
| 95 Vector<Animation*> m_animations; | 94 Vector<Animation*> m_animations; |
| 96 | 95 |
| 96 #if ENABLE(OILPAN) | |
| 97 // Keep a back reference to the target Element, so that we know | |
| 98 // that when this object is finalized, the Element will be dead | |
| 99 // too (=> disposing of the above Animations can be done | |
| 100 // correctly from our finalizer.) | |
| 101 Member<Element> m_target; | |
|
haraken
2014/05/04 01:46:24
I don't fully understand why we need to add m_targ
sof
2014/05/04 18:59:22
With it, you'll be able to accurately notify the A
| |
| 102 #endif | |
| 103 | |
| 97 // CSSAnimations checks if a style change is due to animation. | 104 // CSSAnimations checks if a style change is due to animation. |
| 98 friend class CSSAnimations; | 105 friend class CSSAnimations; |
| 99 }; | 106 }; |
| 100 | 107 |
| 101 } // namespace WebCore | 108 } // namespace WebCore |
| 102 | 109 |
| 103 #endif | 110 #endif |
| OLD | NEW |