Chromium Code Reviews| 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 14 matching lines...) Expand all Loading... | |
| 25 #include "core/animation/ActiveAnimations.h" | 25 #include "core/animation/ActiveAnimations.h" |
| 26 #include "core/dom/DatasetDOMStringMap.h" | 26 #include "core/dom/DatasetDOMStringMap.h" |
| 27 #include "core/dom/NamedNodeMap.h" | 27 #include "core/dom/NamedNodeMap.h" |
| 28 #include "core/dom/NodeRareData.h" | 28 #include "core/dom/NodeRareData.h" |
| 29 #include "core/dom/PseudoElement.h" | 29 #include "core/dom/PseudoElement.h" |
| 30 #include "core/dom/custom/CustomElementDefinition.h" | 30 #include "core/dom/custom/CustomElementDefinition.h" |
| 31 #include "core/dom/shadow/ElementShadow.h" | 31 #include "core/dom/shadow/ElementShadow.h" |
| 32 #include "core/html/ClassList.h" | 32 #include "core/html/ClassList.h" |
| 33 #include "core/html/ime/InputMethodContext.h" | 33 #include "core/html/ime/InputMethodContext.h" |
| 34 #include "core/rendering/style/StyleInheritedData.h" | 34 #include "core/rendering/style/StyleInheritedData.h" |
| 35 #include "platform/heap/Handle.h" | |
| 35 #include "wtf/OwnPtr.h" | 36 #include "wtf/OwnPtr.h" |
| 36 | 37 |
| 37 namespace WebCore { | 38 namespace WebCore { |
| 38 | 39 |
| 39 class HTMLElement; | 40 class HTMLElement; |
| 40 | 41 |
| 41 class ElementRareData : public NodeRareData { | 42 class ElementRareData : public NodeRareData { |
| 42 public: | 43 public: |
| 43 static PassOwnPtr<ElementRareData> create(RenderObject* renderer) | 44 static PassOwnPtr<ElementRareData> create(RenderObject* renderer) |
| 44 { | 45 { |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 78 } | 79 } |
| 79 | 80 |
| 80 NamedNodeMap* attributeMap() const { return m_attributeMap.get(); } | 81 NamedNodeMap* attributeMap() const { return m_attributeMap.get(); } |
| 81 void setAttributeMap(PassOwnPtr<NamedNodeMap> attributeMap) { m_attributeMap = attributeMap; } | 82 void setAttributeMap(PassOwnPtr<NamedNodeMap> attributeMap) { m_attributeMap = attributeMap; } |
| 82 | 83 |
| 83 RenderStyle* computedStyle() const { return m_computedStyle.get(); } | 84 RenderStyle* computedStyle() const { return m_computedStyle.get(); } |
| 84 void setComputedStyle(PassRefPtr<RenderStyle> computedStyle) { m_computedSty le = computedStyle; } | 85 void setComputedStyle(PassRefPtr<RenderStyle> computedStyle) { m_computedSty le = computedStyle; } |
| 85 void clearComputedStyle() { m_computedStyle = nullptr; } | 86 void clearComputedStyle() { m_computedStyle = nullptr; } |
| 86 | 87 |
| 87 ClassList* classList() const { return m_classList.get(); } | 88 ClassList* classList() const { return m_classList.get(); } |
| 88 void setClassList(PassOwnPtr<ClassList> classList) { m_classList = classList ; } | 89 void setClassList(PassOwnPtrWillBeRawPtr<ClassList> classList) { m_classList = classList; } |
| 89 void clearClassListValueForQuirksMode() | 90 void clearClassListValueForQuirksMode() |
| 90 { | 91 { |
| 91 if (!m_classList) | 92 if (!m_classList) |
| 92 return; | 93 return; |
| 93 m_classList->clearValueForQuirksMode(); | 94 m_classList->clearValueForQuirksMode(); |
| 94 } | 95 } |
| 95 | 96 |
| 96 DatasetDOMStringMap* dataset() const { return m_dataset.get(); } | 97 DatasetDOMStringMap* dataset() const { return m_dataset.get(); } |
| 97 void setDataset(PassOwnPtr<DatasetDOMStringMap> dataset) { m_dataset = datas et; } | 98 void setDataset(PassOwnPtrWillBeRawPtr<DatasetDOMStringMap> dataset) { m_dat aset = dataset; } |
| 98 | 99 |
| 99 LayoutSize minimumSizeForResizing() const { return m_minimumSizeForResizing; } | 100 LayoutSize minimumSizeForResizing() const { return m_minimumSizeForResizing; } |
| 100 void setMinimumSizeForResizing(LayoutSize size) { m_minimumSizeForResizing = size; } | 101 void setMinimumSizeForResizing(LayoutSize size) { m_minimumSizeForResizing = size; } |
| 101 | 102 |
| 102 IntSize savedLayerScrollOffset() const { return m_savedLayerScrollOffset; } | 103 IntSize savedLayerScrollOffset() const { return m_savedLayerScrollOffset; } |
| 103 void setSavedLayerScrollOffset(IntSize size) { m_savedLayerScrollOffset = si ze; } | 104 void setSavedLayerScrollOffset(IntSize size) { m_savedLayerScrollOffset = si ze; } |
| 104 | 105 |
| 105 ActiveAnimations* activeAnimations() { return m_activeAnimations.get(); } | 106 ActiveAnimations* activeAnimations() { return m_activeAnimations.get(); } |
| 106 void setActiveAnimations(PassOwnPtrWillBeRawPtr<ActiveAnimations> activeAnim ations) | 107 void setActiveAnimations(PassOwnPtrWillBeRawPtr<ActiveAnimations> activeAnim ations) |
| 107 { | 108 { |
| 108 m_activeAnimations = activeAnimations; | 109 m_activeAnimations = activeAnimations; |
| 109 } | 110 } |
| 110 | 111 |
| 111 bool hasInputMethodContext() const { return m_inputMethodContext; } | 112 bool hasInputMethodContext() const { return m_inputMethodContext; } |
| 112 InputMethodContext& ensureInputMethodContext(HTMLElement* element) | 113 InputMethodContext& ensureInputMethodContext(HTMLElement* element) |
| 113 { | 114 { |
| 114 if (!m_inputMethodContext) | 115 if (!m_inputMethodContext) |
| 115 m_inputMethodContext = InputMethodContext::create(element); | 116 m_inputMethodContext = InputMethodContext::create(element); |
| 116 return *m_inputMethodContext; | 117 return *m_inputMethodContext; |
| 117 } | 118 } |
| 118 | 119 |
| 119 bool hasPseudoElements() const; | 120 bool hasPseudoElements() const; |
| 120 void clearPseudoElements(); | 121 void clearPseudoElements(); |
| 121 | 122 |
| 122 void setCustomElementDefinition(PassRefPtr<CustomElementDefinition> definiti on) { m_customElementDefinition = definition; } | 123 void setCustomElementDefinition(PassRefPtr<CustomElementDefinition> definiti on) { m_customElementDefinition = definition; } |
| 123 CustomElementDefinition* customElementDefinition() const { return m_customEl ementDefinition.get(); } | 124 CustomElementDefinition* customElementDefinition() const { return m_customEl ementDefinition.get(); } |
| 124 | 125 |
| 126 void trace(Visitor*); | |
| 127 | |
| 125 private: | 128 private: |
| 126 short m_tabindex; | 129 short m_tabindex; |
| 127 | 130 |
| 128 LayoutSize m_minimumSizeForResizing; | 131 LayoutSize m_minimumSizeForResizing; |
| 129 IntSize m_savedLayerScrollOffset; | 132 IntSize m_savedLayerScrollOffset; |
| 130 | 133 |
| 131 OwnPtr<DatasetDOMStringMap> m_dataset; | 134 GC_PLUGIN_IGNORE("340522") |
|
Mads Ager (chromium)
2014/04/29 09:05:14
We should work on this bug report. It might be nic
| |
| 132 OwnPtr<ClassList> m_classList; | 135 OwnPtrWillBeMember<DatasetDOMStringMap> m_dataset; |
| 136 GC_PLUGIN_IGNORE("340522") | |
| 137 OwnPtrWillBeMember<ClassList> m_classList; | |
| 133 OwnPtr<ElementShadow> m_shadow; | 138 OwnPtr<ElementShadow> m_shadow; |
| 134 OwnPtr<NamedNodeMap> m_attributeMap; | 139 OwnPtr<NamedNodeMap> m_attributeMap; |
| 135 OwnPtr<InputMethodContext> m_inputMethodContext; | 140 OwnPtr<InputMethodContext> m_inputMethodContext; |
| 136 OwnPtrWillBePersistent<ActiveAnimations> m_activeAnimations; | 141 OwnPtrWillBePersistent<ActiveAnimations> m_activeAnimations; |
| 137 OwnPtr<InlineCSSStyleDeclaration> m_cssomWrapper; | 142 OwnPtr<InlineCSSStyleDeclaration> m_cssomWrapper; |
| 138 | 143 |
| 139 RefPtr<RenderStyle> m_computedStyle; | 144 RefPtr<RenderStyle> m_computedStyle; |
| 140 RefPtr<CustomElementDefinition> m_customElementDefinition; | 145 RefPtr<CustomElementDefinition> m_customElementDefinition; |
| 141 | 146 |
| 142 RefPtr<PseudoElement> m_generatedBefore; | 147 RefPtr<PseudoElement> m_generatedBefore; |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 216 } | 221 } |
| 217 | 222 |
| 218 inline void ElementRareData::resetStyleState() | 223 inline void ElementRareData::resetStyleState() |
| 219 { | 224 { |
| 220 clearElementFlag(StyleAffectedByEmpty); | 225 clearElementFlag(StyleAffectedByEmpty); |
| 221 } | 226 } |
| 222 | 227 |
| 223 } // namespace | 228 } // namespace |
| 224 | 229 |
| 225 #endif // ElementRareData_h | 230 #endif // ElementRareData_h |
| OLD | NEW |