| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 m_tabindex = index; | 56 m_tabindex = index; |
| 57 setElementFlag(TabIndexWasSetExplicitly, true); | 57 setElementFlag(TabIndexWasSetExplicitly, true); |
| 58 } | 58 } |
| 59 | 59 |
| 60 void clearTabIndexExplicitly() | 60 void clearTabIndexExplicitly() |
| 61 { | 61 { |
| 62 m_tabindex = 0; | 62 m_tabindex = 0; |
| 63 clearElementFlag(TabIndexWasSetExplicitly); | 63 clearElementFlag(TabIndexWasSetExplicitly); |
| 64 } | 64 } |
| 65 | 65 |
| 66 unsigned childIndex() const { return m_childIndex; } | |
| 67 void setChildIndex(unsigned index) { m_childIndex = index; } | |
| 68 | |
| 69 CSSStyleDeclaration& ensureInlineCSSStyleDeclaration(Element* ownerElement); | 66 CSSStyleDeclaration& ensureInlineCSSStyleDeclaration(Element* ownerElement); |
| 70 | 67 |
| 71 void clearShadow() { m_shadow = nullptr; } | 68 void clearShadow() { m_shadow = nullptr; } |
| 72 ElementShadow* shadow() const { return m_shadow.get(); } | 69 ElementShadow* shadow() const { return m_shadow.get(); } |
| 73 ElementShadow& ensureShadow() | 70 ElementShadow& ensureShadow() |
| 74 { | 71 { |
| 75 if (!m_shadow) | 72 if (!m_shadow) |
| 76 m_shadow = ElementShadow::create(); | 73 m_shadow = ElementShadow::create(); |
| 77 return *m_shadow; | 74 return *m_shadow; |
| 78 } | 75 } |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 } | 114 } |
| 118 | 115 |
| 119 bool hasPseudoElements() const; | 116 bool hasPseudoElements() const; |
| 120 void clearPseudoElements(); | 117 void clearPseudoElements(); |
| 121 | 118 |
| 122 void setCustomElementDefinition(PassRefPtr<CustomElementDefinition> definiti
on) { m_customElementDefinition = definition; } | 119 void setCustomElementDefinition(PassRefPtr<CustomElementDefinition> definiti
on) { m_customElementDefinition = definition; } |
| 123 CustomElementDefinition* customElementDefinition() const { return m_customEl
ementDefinition.get(); } | 120 CustomElementDefinition* customElementDefinition() const { return m_customEl
ementDefinition.get(); } |
| 124 | 121 |
| 125 private: | 122 private: |
| 126 short m_tabindex; | 123 short m_tabindex; |
| 127 unsigned short m_childIndex; | |
| 128 | 124 |
| 129 LayoutSize m_minimumSizeForResizing; | 125 LayoutSize m_minimumSizeForResizing; |
| 130 IntSize m_savedLayerScrollOffset; | 126 IntSize m_savedLayerScrollOffset; |
| 131 | 127 |
| 132 OwnPtr<DatasetDOMStringMap> m_dataset; | 128 OwnPtr<DatasetDOMStringMap> m_dataset; |
| 133 OwnPtr<ClassList> m_classList; | 129 OwnPtr<ClassList> m_classList; |
| 134 OwnPtr<ElementShadow> m_shadow; | 130 OwnPtr<ElementShadow> m_shadow; |
| 135 OwnPtr<NamedNodeMap> m_attributeMap; | 131 OwnPtr<NamedNodeMap> m_attributeMap; |
| 136 OwnPtr<InputMethodContext> m_inputMethodContext; | 132 OwnPtr<InputMethodContext> m_inputMethodContext; |
| 137 OwnPtrWillBePersistent<ActiveAnimations> m_activeAnimations; | 133 OwnPtrWillBePersistent<ActiveAnimations> m_activeAnimations; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 148 }; | 144 }; |
| 149 | 145 |
| 150 inline IntSize defaultMinimumSizeForResizing() | 146 inline IntSize defaultMinimumSizeForResizing() |
| 151 { | 147 { |
| 152 return IntSize(LayoutUnit::max(), LayoutUnit::max()); | 148 return IntSize(LayoutUnit::max(), LayoutUnit::max()); |
| 153 } | 149 } |
| 154 | 150 |
| 155 inline ElementRareData::ElementRareData(RenderObject* renderer) | 151 inline ElementRareData::ElementRareData(RenderObject* renderer) |
| 156 : NodeRareData(renderer) | 152 : NodeRareData(renderer) |
| 157 , m_tabindex(0) | 153 , m_tabindex(0) |
| 158 , m_childIndex(0) | |
| 159 , m_minimumSizeForResizing(defaultMinimumSizeForResizing()) | 154 , m_minimumSizeForResizing(defaultMinimumSizeForResizing()) |
| 160 { | 155 { |
| 161 } | 156 } |
| 162 | 157 |
| 163 inline ElementRareData::~ElementRareData() | 158 inline ElementRareData::~ElementRareData() |
| 164 { | 159 { |
| 165 ASSERT(!m_shadow); | 160 ASSERT(!m_shadow); |
| 166 ASSERT(!m_generatedBefore); | 161 ASSERT(!m_generatedBefore); |
| 167 ASSERT(!m_generatedAfter); | 162 ASSERT(!m_generatedAfter); |
| 168 ASSERT(!m_backdrop); | 163 ASSERT(!m_backdrop); |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 case BACKDROP: | 208 case BACKDROP: |
| 214 return m_backdrop.get(); | 209 return m_backdrop.get(); |
| 215 default: | 210 default: |
| 216 return 0; | 211 return 0; |
| 217 } | 212 } |
| 218 } | 213 } |
| 219 | 214 |
| 220 inline void ElementRareData::resetStyleState() | 215 inline void ElementRareData::resetStyleState() |
| 221 { | 216 { |
| 222 clearElementFlag(StyleAffectedByEmpty); | 217 clearElementFlag(StyleAffectedByEmpty); |
| 223 setChildIndex(0); | |
| 224 } | 218 } |
| 225 | 219 |
| 226 } // namespace | 220 } // namespace |
| 227 | 221 |
| 228 #endif // ElementRareData_h | 222 #endif // ElementRareData_h |
| OLD | NEW |