| 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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 OwnPtr<DatasetDOMStringMap> m_dataset; | 175 OwnPtr<DatasetDOMStringMap> m_dataset; |
| 176 OwnPtr<ClassList> m_classList; | 176 OwnPtr<ClassList> m_classList; |
| 177 OwnPtr<ElementShadow> m_shadow; | 177 OwnPtr<ElementShadow> m_shadow; |
| 178 OwnPtr<NamedNodeMap> m_attributeMap; | 178 OwnPtr<NamedNodeMap> m_attributeMap; |
| 179 OwnPtr<InputMethodContext> m_inputMethodContext; | 179 OwnPtr<InputMethodContext> m_inputMethodContext; |
| 180 | 180 |
| 181 OwnPtr<Vector<Animation*> > m_activeAnimations; | 181 OwnPtr<Vector<Animation*> > m_activeAnimations; |
| 182 | 182 |
| 183 RefPtr<PseudoElement> m_generatedBefore; | 183 RefPtr<PseudoElement> m_generatedBefore; |
| 184 RefPtr<PseudoElement> m_generatedAfter; | 184 RefPtr<PseudoElement> m_generatedAfter; |
| 185 RefPtr<PseudoElement> m_backdrop; |
| 185 | 186 |
| 186 ElementRareData(RenderObject*); | 187 ElementRareData(RenderObject*); |
| 187 void releasePseudoElement(PseudoElement*); | 188 void releasePseudoElement(PseudoElement*); |
| 188 }; | 189 }; |
| 189 | 190 |
| 190 inline IntSize defaultMinimumSizeForResizing() | 191 inline IntSize defaultMinimumSizeForResizing() |
| 191 { | 192 { |
| 192 return IntSize(LayoutUnit::max(), LayoutUnit::max()); | 193 return IntSize(LayoutUnit::max(), LayoutUnit::max()); |
| 193 } | 194 } |
| 194 | 195 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 214 , m_regionOversetState(RegionUndefined) | 215 , m_regionOversetState(RegionUndefined) |
| 215 , m_minimumSizeForResizing(defaultMinimumSizeForResizing()) | 216 , m_minimumSizeForResizing(defaultMinimumSizeForResizing()) |
| 216 { | 217 { |
| 217 } | 218 } |
| 218 | 219 |
| 219 inline ElementRareData::~ElementRareData() | 220 inline ElementRareData::~ElementRareData() |
| 220 { | 221 { |
| 221 ASSERT(!m_shadow); | 222 ASSERT(!m_shadow); |
| 222 ASSERT(!m_generatedBefore); | 223 ASSERT(!m_generatedBefore); |
| 223 ASSERT(!m_generatedAfter); | 224 ASSERT(!m_generatedAfter); |
| 225 ASSERT(!m_backdrop); |
| 224 } | 226 } |
| 225 | 227 |
| 226 inline void ElementRareData::setPseudoElement(PseudoId pseudoId, PassRefPtr<Pseu
doElement> element) | 228 inline void ElementRareData::setPseudoElement(PseudoId pseudoId, PassRefPtr<Pseu
doElement> element) |
| 227 { | 229 { |
| 228 switch (pseudoId) { | 230 switch (pseudoId) { |
| 229 case BEFORE: | 231 case BEFORE: |
| 230 releasePseudoElement(m_generatedBefore.get()); | 232 releasePseudoElement(m_generatedBefore.get()); |
| 231 m_generatedBefore = element; | 233 m_generatedBefore = element; |
| 232 break; | 234 break; |
| 233 case AFTER: | 235 case AFTER: |
| 234 releasePseudoElement(m_generatedAfter.get()); | 236 releasePseudoElement(m_generatedAfter.get()); |
| 235 m_generatedAfter = element; | 237 m_generatedAfter = element; |
| 236 break; | 238 break; |
| 239 case BACKDROP: |
| 240 releasePseudoElement(m_backdrop.get()); |
| 241 m_backdrop = element; |
| 242 break; |
| 237 default: | 243 default: |
| 238 ASSERT_NOT_REACHED(); | 244 ASSERT_NOT_REACHED(); |
| 239 } | 245 } |
| 240 } | 246 } |
| 241 | 247 |
| 242 inline PseudoElement* ElementRareData::pseudoElement(PseudoId pseudoId) const | 248 inline PseudoElement* ElementRareData::pseudoElement(PseudoId pseudoId) const |
| 243 { | 249 { |
| 244 switch (pseudoId) { | 250 switch (pseudoId) { |
| 245 case BEFORE: | 251 case BEFORE: |
| 246 return m_generatedBefore.get(); | 252 return m_generatedBefore.get(); |
| 247 case AFTER: | 253 case AFTER: |
| 248 return m_generatedAfter.get(); | 254 return m_generatedAfter.get(); |
| 255 case BACKDROP: |
| 256 return m_backdrop.get(); |
| 249 default: | 257 default: |
| 250 return 0; | 258 return 0; |
| 251 } | 259 } |
| 252 } | 260 } |
| 253 | 261 |
| 254 inline void ElementRareData::releasePseudoElement(PseudoElement* element) | 262 inline void ElementRareData::releasePseudoElement(PseudoElement* element) |
| 255 { | 263 { |
| 256 if (!element) | 264 if (!element) |
| 257 return; | 265 return; |
| 258 | 266 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 280 setChildrenAffectedByFirstChildRules(false); | 288 setChildrenAffectedByFirstChildRules(false); |
| 281 setChildrenAffectedByLastChildRules(false); | 289 setChildrenAffectedByLastChildRules(false); |
| 282 setChildrenAffectedByDirectAdjacentRules(false); | 290 setChildrenAffectedByDirectAdjacentRules(false); |
| 283 setChildrenAffectedByForwardPositionalRules(false); | 291 setChildrenAffectedByForwardPositionalRules(false); |
| 284 setChildrenAffectedByBackwardPositionalRules(false); | 292 setChildrenAffectedByBackwardPositionalRules(false); |
| 285 } | 293 } |
| 286 | 294 |
| 287 } // namespace | 295 } // namespace |
| 288 | 296 |
| 289 #endif // ElementRareData_h | 297 #endif // ElementRareData_h |
| OLD | NEW |