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

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 + EventHandler.cpp oilpan compile fix 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
« no previous file with comments | « no previous file | Source/core/animation/ActiveAnimations.cpp » ('j') | Source/core/dom/Element.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 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
OLDNEW
« no previous file with comments | « no previous file | Source/core/animation/ActiveAnimations.cpp » ('j') | Source/core/dom/Element.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698