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