Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(36)

Side by Side Diff: Source/core/animation/ActiveAnimations.h

Issue 265793017: Oilpan: move node/element rare data objects to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased + have MutationObserver keep a weak ref to registrations Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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 this object
98 // will be finalized during the same GC sweep as the target (as the
99 // Element keeps a reference in the other direction via its
100 // rare data.) This is done so that we can accurately notify the
101 // the Element as destroyed to the above vector of Animations in
102 // the ActiveAnimations finalizer.
103 Member<Element> m_target;
104 #endif
105
97 // CSSAnimations checks if a style change is due to animation. 106 // CSSAnimations checks if a style change is due to animation.
98 friend class CSSAnimations; 107 friend class CSSAnimations;
99 }; 108 };
100 109
101 } // namespace WebCore 110 } // namespace WebCore
102 111
103 #endif 112 #endif
OLDNEW
« no previous file with comments | « no previous file | Source/core/animation/ActiveAnimations.cpp » ('j') | Source/core/dom/ElementRareData.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698