OLD | NEW |
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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 | 121 |
122 DatasetDOMStringMap* dataset() const { return m_dataset.get(); } | 122 DatasetDOMStringMap* dataset() const { return m_dataset.get(); } |
123 void setDataset(PassOwnPtr<DatasetDOMStringMap> dataset) { m_dataset = datas
et; } | 123 void setDataset(PassOwnPtr<DatasetDOMStringMap> dataset) { m_dataset = datas
et; } |
124 | 124 |
125 LayoutSize minimumSizeForResizing() const { return m_minimumSizeForResizing;
} | 125 LayoutSize minimumSizeForResizing() const { return m_minimumSizeForResizing;
} |
126 void setMinimumSizeForResizing(LayoutSize size) { m_minimumSizeForResizing =
size; } | 126 void setMinimumSizeForResizing(LayoutSize size) { m_minimumSizeForResizing =
size; } |
127 | 127 |
128 IntSize savedLayerScrollOffset() const { return m_savedLayerScrollOffset; } | 128 IntSize savedLayerScrollOffset() const { return m_savedLayerScrollOffset; } |
129 void setSavedLayerScrollOffset(IntSize size) { m_savedLayerScrollOffset = si
ze; } | 129 void setSavedLayerScrollOffset(IntSize size) { m_savedLayerScrollOffset = si
ze; } |
130 | 130 |
131 Vector<Animation*>* activeAnimations() { return m_activeAnimations.get(); } | 131 ActiveAnimations* activeAnimations() { return m_activeAnimations.get(); } |
132 void setActiveAnimations(PassOwnPtr<Vector<Animation*> > animations) | 132 void setActiveAnimations(PassOwnPtr<ActiveAnimations> activeAnimations) |
133 { | 133 { |
134 m_activeAnimations = animations; | 134 m_activeAnimations = activeAnimations; |
135 } | 135 } |
136 | 136 |
137 bool hasPendingResources() const { return m_hasPendingResources; } | 137 bool hasPendingResources() const { return m_hasPendingResources; } |
138 void setHasPendingResources(bool has) { m_hasPendingResources = has; } | 138 void setHasPendingResources(bool has) { m_hasPendingResources = has; } |
139 | 139 |
140 InputMethodContext* ensureInputMethodContext(HTMLElement* element) | 140 InputMethodContext* ensureInputMethodContext(HTMLElement* element) |
141 { | 141 { |
142 if (!m_inputMethodContext) | 142 if (!m_inputMethodContext) |
143 m_inputMethodContext = InputMethodContext::create(element); | 143 m_inputMethodContext = InputMethodContext::create(element); |
144 return m_inputMethodContext.get(); | 144 return m_inputMethodContext.get(); |
(...skipping 26 matching lines...) Expand all Loading... |
171 | 171 |
172 LayoutSize m_minimumSizeForResizing; | 172 LayoutSize m_minimumSizeForResizing; |
173 IntSize m_savedLayerScrollOffset; | 173 IntSize m_savedLayerScrollOffset; |
174 RefPtr<RenderStyle> m_computedStyle; | 174 RefPtr<RenderStyle> m_computedStyle; |
175 | 175 |
176 OwnPtr<DatasetDOMStringMap> m_dataset; | 176 OwnPtr<DatasetDOMStringMap> m_dataset; |
177 OwnPtr<ClassList> m_classList; | 177 OwnPtr<ClassList> m_classList; |
178 OwnPtr<ElementShadow> m_shadow; | 178 OwnPtr<ElementShadow> m_shadow; |
179 OwnPtr<NamedNodeMap> m_attributeMap; | 179 OwnPtr<NamedNodeMap> m_attributeMap; |
180 OwnPtr<InputMethodContext> m_inputMethodContext; | 180 OwnPtr<InputMethodContext> m_inputMethodContext; |
181 | 181 OwnPtr<ActiveAnimations> m_activeAnimations; |
182 OwnPtr<Vector<Animation*> > m_activeAnimations; | |
183 | 182 |
184 RefPtr<PseudoElement> m_generatedBefore; | 183 RefPtr<PseudoElement> m_generatedBefore; |
185 RefPtr<PseudoElement> m_generatedAfter; | 184 RefPtr<PseudoElement> m_generatedAfter; |
186 RefPtr<PseudoElement> m_backdrop; | 185 RefPtr<PseudoElement> m_backdrop; |
187 | 186 |
188 ElementRareData(RenderObject*); | 187 ElementRareData(RenderObject*); |
189 void releasePseudoElement(PseudoElement*); | 188 void releasePseudoElement(PseudoElement*); |
190 }; | 189 }; |
191 | 190 |
192 inline IntSize defaultMinimumSizeForResizing() | 191 inline IntSize defaultMinimumSizeForResizing() |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 setChildrenAffectedByFirstChildRules(false); | 290 setChildrenAffectedByFirstChildRules(false); |
292 setChildrenAffectedByLastChildRules(false); | 291 setChildrenAffectedByLastChildRules(false); |
293 setChildrenAffectedByDirectAdjacentRules(false); | 292 setChildrenAffectedByDirectAdjacentRules(false); |
294 setChildrenAffectedByForwardPositionalRules(false); | 293 setChildrenAffectedByForwardPositionalRules(false); |
295 setChildrenAffectedByBackwardPositionalRules(false); | 294 setChildrenAffectedByBackwardPositionalRules(false); |
296 } | 295 } |
297 | 296 |
298 } // namespace | 297 } // namespace |
299 | 298 |
300 #endif // ElementRareData_h | 299 #endif // ElementRareData_h |
OLD | NEW |