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

Side by Side Diff: Source/core/dom/ElementRareData.h

Issue 19266007: Web Animations: Introduce ActiveAnimations and AnimationStack (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Removed maps. Store ActiveAnimations in ElementRareData. Created 7 years, 5 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008, 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2008, 2009, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2008 David Smith <catfish.man@gmail.com> 3 * Copyright (C) 2008 David Smith <catfish.man@gmail.com>
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details. 13 * Library General Public License for more details.
14 * 14 *
15 * You should have received a copy of the GNU Library General Public License 15 * You should have received a copy of the GNU Library General Public License
16 * along with this library; see the file COPYING.LIB. If not, write to 16 * along with this library; see the file COPYING.LIB. If not, write to
17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA. 18 * Boston, MA 02110-1301, USA.
19 * 19 *
20 */ 20 */
21 21
22 #ifndef ElementRareData_h 22 #ifndef ElementRareData_h
23 #define ElementRareData_h 23 #define ElementRareData_h
24 24
25 #include "core/animation/ActiveAnimations.h"
25 #include "core/dom/DatasetDOMStringMap.h" 26 #include "core/dom/DatasetDOMStringMap.h"
26 #include "core/dom/NamedNodeMap.h" 27 #include "core/dom/NamedNodeMap.h"
27 #include "core/dom/NodeRareData.h" 28 #include "core/dom/NodeRareData.h"
28 #include "core/dom/PseudoElement.h" 29 #include "core/dom/PseudoElement.h"
29 #include "core/dom/shadow/ElementShadow.h" 30 #include "core/dom/shadow/ElementShadow.h"
30 #include "core/html/ClassList.h" 31 #include "core/html/ClassList.h"
31 #include "core/html/ime/InputMethodContext.h" 32 #include "core/html/ime/InputMethodContext.h"
32 #include "core/rendering/style/StyleInheritedData.h" 33 #include "core/rendering/style/StyleInheritedData.h"
33 #include "wtf/OwnPtr.h" 34 #include "wtf/OwnPtr.h"
34 35
35 namespace WebCore { 36 namespace WebCore {
36 37
37 class Animation;
38 class HTMLElement; 38 class HTMLElement;
39 39
40 class ElementRareData : public NodeRareData { 40 class ElementRareData : public NodeRareData {
41 public: 41 public:
42 static PassOwnPtr<ElementRareData> create(RenderObject* renderer) { return a doptPtr(new ElementRareData(renderer)); } 42 static PassOwnPtr<ElementRareData> create(RenderObject* renderer) { return a doptPtr(new ElementRareData(renderer)); }
43 43
44 ~ElementRareData(); 44 ~ElementRareData();
45 45
46 void setPseudoElement(PseudoId, PassRefPtr<PseudoElement>); 46 void setPseudoElement(PseudoId, PassRefPtr<PseudoElement>);
47 PseudoElement* pseudoElement(PseudoId) const; 47 PseudoElement* pseudoElement(PseudoId) const;
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 124
125 DatasetDOMStringMap* dataset() const { return m_dataset.get(); } 125 DatasetDOMStringMap* dataset() const { return m_dataset.get(); }
126 void setDataset(PassOwnPtr<DatasetDOMStringMap> dataset) { m_dataset = datas et; } 126 void setDataset(PassOwnPtr<DatasetDOMStringMap> dataset) { m_dataset = datas et; }
127 127
128 LayoutSize minimumSizeForResizing() const { return m_minimumSizeForResizing; } 128 LayoutSize minimumSizeForResizing() const { return m_minimumSizeForResizing; }
129 void setMinimumSizeForResizing(LayoutSize size) { m_minimumSizeForResizing = size; } 129 void setMinimumSizeForResizing(LayoutSize size) { m_minimumSizeForResizing = size; }
130 130
131 IntSize savedLayerScrollOffset() const { return m_savedLayerScrollOffset; } 131 IntSize savedLayerScrollOffset() const { return m_savedLayerScrollOffset; }
132 void setSavedLayerScrollOffset(IntSize size) { m_savedLayerScrollOffset = si ze; } 132 void setSavedLayerScrollOffset(IntSize size) { m_savedLayerScrollOffset = si ze; }
133 133
134 Vector<Animation*>* activeAnimations() { return m_activeAnimations.get(); } 134 ActiveAnimations* activeAnimations() { return m_activeAnimations.get(); }
135 void setActiveAnimations(PassOwnPtr<Vector<Animation*> > animations) 135 void setActiveAnimations(PassOwnPtr<ActiveAnimations> activeAnimations)
136 { 136 {
137 m_activeAnimations = animations; 137 m_activeAnimations = activeAnimations;
138 } 138 }
139 139
140 bool hasPendingResources() const { return m_hasPendingResources; } 140 bool hasPendingResources() const { return m_hasPendingResources; }
141 void setHasPendingResources(bool has) { m_hasPendingResources = has; } 141 void setHasPendingResources(bool has) { m_hasPendingResources = has; }
142 142
143 InputMethodContext* ensureInputMethodContext(HTMLElement* element) 143 InputMethodContext* ensureInputMethodContext(HTMLElement* element)
144 { 144 {
145 if (!m_inputMethodContext) 145 if (!m_inputMethodContext)
146 m_inputMethodContext = InputMethodContext::create(element); 146 m_inputMethodContext = InputMethodContext::create(element);
147 return m_inputMethodContext.get(); 147 return m_inputMethodContext.get();
(...skipping 26 matching lines...) Expand all
174 174
175 LayoutSize m_minimumSizeForResizing; 175 LayoutSize m_minimumSizeForResizing;
176 IntSize m_savedLayerScrollOffset; 176 IntSize m_savedLayerScrollOffset;
177 RefPtr<RenderStyle> m_computedStyle; 177 RefPtr<RenderStyle> m_computedStyle;
178 178
179 OwnPtr<DatasetDOMStringMap> m_dataset; 179 OwnPtr<DatasetDOMStringMap> m_dataset;
180 OwnPtr<ClassList> m_classList; 180 OwnPtr<ClassList> m_classList;
181 OwnPtr<ElementShadow> m_shadow; 181 OwnPtr<ElementShadow> m_shadow;
182 OwnPtr<NamedNodeMap> m_attributeMap; 182 OwnPtr<NamedNodeMap> m_attributeMap;
183 OwnPtr<InputMethodContext> m_inputMethodContext; 183 OwnPtr<InputMethodContext> m_inputMethodContext;
184 184 OwnPtr<ActiveAnimations> m_activeAnimations;
185 OwnPtr<Vector<Animation*> > m_activeAnimations;
186 185
187 RefPtr<PseudoElement> m_generatedBefore; 186 RefPtr<PseudoElement> m_generatedBefore;
188 RefPtr<PseudoElement> m_generatedAfter; 187 RefPtr<PseudoElement> m_generatedAfter;
189 RefPtr<PseudoElement> m_backdrop; 188 RefPtr<PseudoElement> m_backdrop;
190 189
191 ElementRareData(RenderObject*); 190 ElementRareData(RenderObject*);
192 void releasePseudoElement(PseudoElement*); 191 void releasePseudoElement(PseudoElement*);
193 }; 192 };
194 193
195 inline IntSize defaultMinimumSizeForResizing() 194 inline IntSize defaultMinimumSizeForResizing()
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 setChildrenAffectedByFirstChildRules(false); 293 setChildrenAffectedByFirstChildRules(false);
295 setChildrenAffectedByLastChildRules(false); 294 setChildrenAffectedByLastChildRules(false);
296 setChildrenAffectedByDirectAdjacentRules(false); 295 setChildrenAffectedByDirectAdjacentRules(false);
297 setChildrenAffectedByForwardPositionalRules(false); 296 setChildrenAffectedByForwardPositionalRules(false);
298 setChildrenAffectedByBackwardPositionalRules(false); 297 setChildrenAffectedByBackwardPositionalRules(false);
299 } 298 }
300 299
301 } // namespace 300 } // namespace
302 301
303 #endif // ElementRareData_h 302 #endif // ElementRareData_h
OLDNEW
« Source/core/animation/DocumentTimeline.h ('K') | « Source/core/dom/Element.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698