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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 InputMethodContext& ensureInputMethodContext(HTMLElement* element) | 116 InputMethodContext& ensureInputMethodContext(HTMLElement* element) |
117 { | 117 { |
118 if (!m_inputMethodContext) | 118 if (!m_inputMethodContext) |
119 m_inputMethodContext = InputMethodContext::create(element); | 119 m_inputMethodContext = InputMethodContext::create(element); |
120 return *m_inputMethodContext; | 120 return *m_inputMethodContext; |
121 } | 121 } |
122 | 122 |
123 bool hasPseudoElements() const; | 123 bool hasPseudoElements() const; |
124 void clearPseudoElements(); | 124 void clearPseudoElements(); |
125 | 125 |
| 126 uint32_t incrementProxyCount() { return ++m_proxyCount; } |
| 127 uint32_t decrementProxyCount() |
| 128 { |
| 129 ASSERT(m_proxyCount); |
| 130 return --m_proxyCount; |
| 131 } |
| 132 uint32_t proxyCount() const { return m_proxyCount; } |
| 133 |
126 void setCustomElementDefinition(PassRefPtrWillBeRawPtr<CustomElementDefiniti
on> definition) { m_customElementDefinition = definition; } | 134 void setCustomElementDefinition(PassRefPtrWillBeRawPtr<CustomElementDefiniti
on> definition) { m_customElementDefinition = definition; } |
127 CustomElementDefinition* customElementDefinition() const { return m_customEl
ementDefinition.get(); } | 135 CustomElementDefinition* customElementDefinition() const { return m_customEl
ementDefinition.get(); } |
128 | 136 |
129 WillBeHeapVector<RefPtrWillBeMember<Attr>>& ensureAttrNodeList(); | 137 WillBeHeapVector<RefPtrWillBeMember<Attr>>& ensureAttrNodeList(); |
130 WillBeHeapVector<RefPtrWillBeMember<Attr>>* attrNodeList() { return m_attrNo
deList.get(); } | 138 WillBeHeapVector<RefPtrWillBeMember<Attr>>* attrNodeList() { return m_attrNo
deList.get(); } |
131 void removeAttrNodeList() { m_attrNodeList.clear(); } | 139 void removeAttrNodeList() { m_attrNodeList.clear(); } |
132 | 140 |
133 DECLARE_TRACE_AFTER_DISPATCH(); | 141 DECLARE_TRACE_AFTER_DISPATCH(); |
134 | 142 |
135 private: | 143 private: |
136 short m_tabindex; | 144 short m_tabindex; |
137 bool m_tabStop; | 145 unsigned short m_tabStop : 1; |
| 146 unsigned short m_proxyCount : 10; |
138 | 147 |
139 LayoutSize m_minimumSizeForResizing; | 148 LayoutSize m_minimumSizeForResizing; |
140 IntSize m_savedLayerScrollOffset; | 149 IntSize m_savedLayerScrollOffset; |
141 | 150 |
142 OwnPtrWillBeMember<DatasetDOMStringMap> m_dataset; | 151 OwnPtrWillBeMember<DatasetDOMStringMap> m_dataset; |
143 OwnPtrWillBeMember<ClassList> m_classList; | 152 OwnPtrWillBeMember<ClassList> m_classList; |
144 OwnPtrWillBeMember<ElementShadow> m_shadow; | 153 OwnPtrWillBeMember<ElementShadow> m_shadow; |
145 OwnPtrWillBeMember<NamedNodeMap> m_attributeMap; | 154 OwnPtrWillBeMember<NamedNodeMap> m_attributeMap; |
146 OwnPtrWillBeMember<WillBeHeapVector<RefPtrWillBeMember<Attr>>> m_attrNodeLis
t; | 155 OwnPtrWillBeMember<WillBeHeapVector<RefPtrWillBeMember<Attr>>> m_attrNodeLis
t; |
147 OwnPtrWillBeMember<InputMethodContext> m_inputMethodContext; | 156 OwnPtrWillBeMember<InputMethodContext> m_inputMethodContext; |
(...skipping 13 matching lines...) Expand all Loading... |
161 | 170 |
162 inline LayoutSize defaultMinimumSizeForResizing() | 171 inline LayoutSize defaultMinimumSizeForResizing() |
163 { | 172 { |
164 return LayoutSize(LayoutUnit::max(), LayoutUnit::max()); | 173 return LayoutSize(LayoutUnit::max(), LayoutUnit::max()); |
165 } | 174 } |
166 | 175 |
167 inline ElementRareData::ElementRareData(LayoutObject* renderer) | 176 inline ElementRareData::ElementRareData(LayoutObject* renderer) |
168 : NodeRareData(renderer) | 177 : NodeRareData(renderer) |
169 , m_tabindex(0) | 178 , m_tabindex(0) |
170 , m_tabStop(true) | 179 , m_tabStop(true) |
| 180 , m_proxyCount(0) |
171 , m_minimumSizeForResizing(defaultMinimumSizeForResizing()) | 181 , m_minimumSizeForResizing(defaultMinimumSizeForResizing()) |
172 { | 182 { |
173 m_isElementRareData = true; | 183 m_isElementRareData = true; |
174 } | 184 } |
175 | 185 |
176 inline ElementRareData::~ElementRareData() | 186 inline ElementRareData::~ElementRareData() |
177 { | 187 { |
178 #if !ENABLE(OILPAN) | 188 #if !ENABLE(OILPAN) |
179 ASSERT(!m_shadow); | 189 ASSERT(!m_shadow); |
180 #endif | 190 #endif |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 case FIRST_LETTER: | 247 case FIRST_LETTER: |
238 return m_generatedFirstLetter.get(); | 248 return m_generatedFirstLetter.get(); |
239 default: | 249 default: |
240 return 0; | 250 return 0; |
241 } | 251 } |
242 } | 252 } |
243 | 253 |
244 } // namespace | 254 } // namespace |
245 | 255 |
246 #endif // ElementRareData_h | 256 #endif // ElementRareData_h |
OLD | NEW |