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