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, |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 void clearClassListValueForQuirksMode() | 86 void clearClassListValueForQuirksMode() |
87 { | 87 { |
88 if (!m_classList) | 88 if (!m_classList) |
89 return; | 89 return; |
90 m_classList->clearValueForQuirksMode(); | 90 m_classList->clearValueForQuirksMode(); |
91 } | 91 } |
92 | 92 |
93 DatasetDOMStringMap* dataset() const { return m_dataset.get(); } | 93 DatasetDOMStringMap* dataset() const { return m_dataset.get(); } |
94 void setDataset(PassOwnPtr<DatasetDOMStringMap> dataset) { m_dataset = datas
et; } | 94 void setDataset(PassOwnPtr<DatasetDOMStringMap> dataset) { m_dataset = datas
et; } |
95 | 95 |
96 LayoutSize minimumSizeForResizing() const { return m_minimumSizeForResizing;
} | |
97 void setMinimumSizeForResizing(LayoutSize size) { m_minimumSizeForResizing =
size; } | |
98 | |
99 IntSize savedLayerScrollOffset() const { return m_savedLayerScrollOffset; } | 96 IntSize savedLayerScrollOffset() const { return m_savedLayerScrollOffset; } |
100 void setSavedLayerScrollOffset(IntSize size) { m_savedLayerScrollOffset = si
ze; } | 97 void setSavedLayerScrollOffset(IntSize size) { m_savedLayerScrollOffset = si
ze; } |
101 | 98 |
102 ActiveAnimations* activeAnimations() { return m_activeAnimations.get(); } | 99 ActiveAnimations* activeAnimations() { return m_activeAnimations.get(); } |
103 void setActiveAnimations(PassOwnPtrWillBeRawPtr<ActiveAnimations> activeAnim
ations) | 100 void setActiveAnimations(PassOwnPtrWillBeRawPtr<ActiveAnimations> activeAnim
ations) |
104 { | 101 { |
105 m_activeAnimations = activeAnimations; | 102 m_activeAnimations = activeAnimations; |
106 } | 103 } |
107 | 104 |
108 bool hasInputMethodContext() const { return m_inputMethodContext; } | 105 bool hasInputMethodContext() const { return m_inputMethodContext; } |
109 InputMethodContext& ensureInputMethodContext(HTMLElement* element) | 106 InputMethodContext& ensureInputMethodContext(HTMLElement* element) |
110 { | 107 { |
111 if (!m_inputMethodContext) | 108 if (!m_inputMethodContext) |
112 m_inputMethodContext = InputMethodContext::create(element); | 109 m_inputMethodContext = InputMethodContext::create(element); |
113 return *m_inputMethodContext; | 110 return *m_inputMethodContext; |
114 } | 111 } |
115 | 112 |
116 bool hasPseudoElements() const; | 113 bool hasPseudoElements() const; |
117 void clearPseudoElements(); | 114 void clearPseudoElements(); |
118 | 115 |
119 void setCustomElementDefinition(PassRefPtr<CustomElementDefinition> definiti
on) { m_customElementDefinition = definition; } | 116 void setCustomElementDefinition(PassRefPtr<CustomElementDefinition> definiti
on) { m_customElementDefinition = definition; } |
120 CustomElementDefinition* customElementDefinition() const { return m_customEl
ementDefinition.get(); } | 117 CustomElementDefinition* customElementDefinition() const { return m_customEl
ementDefinition.get(); } |
121 | 118 |
122 private: | 119 private: |
123 short m_tabindex; | 120 short m_tabindex; |
124 | 121 |
125 LayoutSize m_minimumSizeForResizing; | |
126 IntSize m_savedLayerScrollOffset; | 122 IntSize m_savedLayerScrollOffset; |
127 | 123 |
128 OwnPtr<DatasetDOMStringMap> m_dataset; | 124 OwnPtr<DatasetDOMStringMap> m_dataset; |
129 OwnPtr<ClassList> m_classList; | 125 OwnPtr<ClassList> m_classList; |
130 OwnPtr<ElementShadow> m_shadow; | 126 OwnPtr<ElementShadow> m_shadow; |
131 OwnPtr<NamedNodeMap> m_attributeMap; | 127 OwnPtr<NamedNodeMap> m_attributeMap; |
132 OwnPtr<InputMethodContext> m_inputMethodContext; | 128 OwnPtr<InputMethodContext> m_inputMethodContext; |
133 OwnPtrWillBePersistent<ActiveAnimations> m_activeAnimations; | 129 OwnPtrWillBePersistent<ActiveAnimations> m_activeAnimations; |
134 OwnPtr<InlineCSSStyleDeclaration> m_cssomWrapper; | 130 OwnPtr<InlineCSSStyleDeclaration> m_cssomWrapper; |
135 | 131 |
136 RefPtr<RenderStyle> m_computedStyle; | 132 RefPtr<RenderStyle> m_computedStyle; |
137 RefPtr<CustomElementDefinition> m_customElementDefinition; | 133 RefPtr<CustomElementDefinition> m_customElementDefinition; |
138 | 134 |
139 RefPtr<PseudoElement> m_generatedBefore; | 135 RefPtr<PseudoElement> m_generatedBefore; |
140 RefPtr<PseudoElement> m_generatedAfter; | 136 RefPtr<PseudoElement> m_generatedAfter; |
141 RefPtr<PseudoElement> m_backdrop; | 137 RefPtr<PseudoElement> m_backdrop; |
142 | 138 |
143 explicit ElementRareData(RenderObject*); | 139 explicit ElementRareData(RenderObject*); |
144 }; | 140 }; |
145 | 141 |
146 inline IntSize defaultMinimumSizeForResizing() | |
147 { | |
148 return IntSize(LayoutUnit::max(), LayoutUnit::max()); | |
149 } | |
150 | |
151 inline ElementRareData::ElementRareData(RenderObject* renderer) | 142 inline ElementRareData::ElementRareData(RenderObject* renderer) |
152 : NodeRareData(renderer) | 143 : NodeRareData(renderer) |
153 , m_tabindex(0) | 144 , m_tabindex(0) |
154 , m_minimumSizeForResizing(defaultMinimumSizeForResizing()) | |
155 { | 145 { |
156 } | 146 } |
157 | 147 |
158 inline ElementRareData::~ElementRareData() | 148 inline ElementRareData::~ElementRareData() |
159 { | 149 { |
160 ASSERT(!m_shadow); | 150 ASSERT(!m_shadow); |
161 ASSERT(!m_generatedBefore); | 151 ASSERT(!m_generatedBefore); |
162 ASSERT(!m_generatedAfter); | 152 ASSERT(!m_generatedAfter); |
163 ASSERT(!m_backdrop); | 153 ASSERT(!m_backdrop); |
164 } | 154 } |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 } | 203 } |
214 | 204 |
215 inline void ElementRareData::resetStyleState() | 205 inline void ElementRareData::resetStyleState() |
216 { | 206 { |
217 clearElementFlag(StyleAffectedByEmpty); | 207 clearElementFlag(StyleAffectedByEmpty); |
218 } | 208 } |
219 | 209 |
220 } // namespace | 210 } // namespace |
221 | 211 |
222 #endif // ElementRareData_h | 212 #endif // ElementRareData_h |
OLD | NEW |