Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(127)

Side by Side Diff: third_party/WebKit/Source/core/dom/ElementRareData.h

Issue 1715653002: Fix non-Oilpan ref pointer usage over DOMTokenLists. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 } 81 }
82 82
83 NamedNodeMap* attributeMap() const { return m_attributeMap.get(); } 83 NamedNodeMap* attributeMap() const { return m_attributeMap.get(); }
84 void setAttributeMap(PassOwnPtrWillBeRawPtr<NamedNodeMap> attributeMap) { m_ attributeMap = attributeMap; } 84 void setAttributeMap(PassOwnPtrWillBeRawPtr<NamedNodeMap> attributeMap) { m_ attributeMap = attributeMap; }
85 85
86 ComputedStyle* ensureComputedStyle() const { return m_computedStyle.get(); } 86 ComputedStyle* ensureComputedStyle() const { return m_computedStyle.get(); }
87 void setComputedStyle(PassRefPtr<ComputedStyle> computedStyle) { m_computedS tyle = computedStyle; } 87 void setComputedStyle(PassRefPtr<ComputedStyle> computedStyle) { m_computedS tyle = computedStyle; }
88 void clearComputedStyle() { m_computedStyle = nullptr; } 88 void clearComputedStyle() { m_computedStyle = nullptr; }
89 89
90 ClassList* classList() const { return m_classList.get(); } 90 ClassList* classList() const { return m_classList.get(); }
91 void setClassList(PassRefPtrWillBeRawPtr<ClassList> classList) { m_classList = classList; } 91 void setClassList(PassRefPtrWillBeRawPtr<ClassList> classList) { m_classList = classList.leakRef(); }
92 void clearClassListValueForQuirksMode() 92 void clearClassListValueForQuirksMode()
93 { 93 {
94 if (!m_classList) 94 if (!m_classList)
95 return; 95 return;
96 m_classList->clearValueForQuirksMode(); 96 m_classList->clearValueForQuirksMode();
97 } 97 }
98 98
99 DatasetDOMStringMap* dataset() const { return m_dataset.get(); } 99 DatasetDOMStringMap* dataset() const { return m_dataset.get(); }
100 void setDataset(PassOwnPtrWillBeRawPtr<DatasetDOMStringMap> dataset) { m_dat aset = dataset; } 100 void setDataset(PassOwnPtrWillBeRawPtr<DatasetDOMStringMap> dataset) { m_dat aset = dataset; }
101 101
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 CompositorProxiedPropertySet& ensureCompositorProxiedPropertySet(); 139 CompositorProxiedPropertySet& ensureCompositorProxiedPropertySet();
140 void clearCompositorProxiedPropertySet() { m_proxiedProperties = nullptr; } 140 void clearCompositorProxiedPropertySet() { m_proxiedProperties = nullptr; }
141 141
142 short m_tabindex; 142 short m_tabindex;
143 143
144 LayoutSize m_minimumSizeForResizing; 144 LayoutSize m_minimumSizeForResizing;
145 IntSize m_savedLayerScrollOffset; 145 IntSize m_savedLayerScrollOffset;
146 146
147 OwnPtrWillBeMember<DatasetDOMStringMap> m_dataset; 147 OwnPtrWillBeMember<DatasetDOMStringMap> m_dataset;
148 OwnPtrWillBeMember<ElementShadow> m_shadow; 148 OwnPtrWillBeMember<ElementShadow> m_shadow;
149 RefPtrWillBeMember<ClassList> m_classList; 149 RawPtrWillBeMember<ClassList> m_classList;
150 OwnPtrWillBeMember<NamedNodeMap> m_attributeMap; 150 OwnPtrWillBeMember<NamedNodeMap> m_attributeMap;
151 OwnPtrWillBeMember<AttrNodeList> m_attrNodeList; 151 OwnPtrWillBeMember<AttrNodeList> m_attrNodeList;
152 OwnPtrWillBeMember<InlineCSSStyleDeclaration> m_cssomWrapper; 152 OwnPtrWillBeMember<InlineCSSStyleDeclaration> m_cssomWrapper;
153 OwnPtr<CompositorProxiedPropertySet> m_proxiedProperties; 153 OwnPtr<CompositorProxiedPropertySet> m_proxiedProperties;
154 154
155 PersistentWillBeMember<ElementAnimations> m_elementAnimations; 155 PersistentWillBeMember<ElementAnimations> m_elementAnimations;
156 PersistentWillBeMember<NodeIntersectionObserverData> m_intersectionObserverD ata; 156 PersistentWillBeMember<NodeIntersectionObserverData> m_intersectionObserverD ata;
157 157
158 RefPtr<ComputedStyle> m_computedStyle; 158 RefPtr<ComputedStyle> m_computedStyle;
159 RefPtrWillBeMember<CustomElementDefinition> m_customElementDefinition; 159 RefPtrWillBeMember<CustomElementDefinition> m_customElementDefinition;
160 160
161 RefPtrWillBeMember<PseudoElement> m_generatedBefore; 161 RefPtrWillBeMember<PseudoElement> m_generatedBefore;
162 RefPtrWillBeMember<PseudoElement> m_generatedAfter; 162 RefPtrWillBeMember<PseudoElement> m_generatedAfter;
163 RefPtrWillBeMember<PseudoElement> m_generatedFirstLetter; 163 RefPtrWillBeMember<PseudoElement> m_generatedFirstLetter;
164 RefPtrWillBeMember<PseudoElement> m_backdrop; 164 RefPtrWillBeMember<PseudoElement> m_backdrop;
165 165
166 explicit ElementRareData(LayoutObject*); 166 explicit ElementRareData(LayoutObject*);
167 }; 167 };
168 168
169 inline LayoutSize defaultMinimumSizeForResizing() 169 inline LayoutSize defaultMinimumSizeForResizing()
170 { 170 {
171 return LayoutSize(LayoutUnit::max(), LayoutUnit::max()); 171 return LayoutSize(LayoutUnit::max(), LayoutUnit::max());
172 } 172 }
173 173
174 inline ElementRareData::ElementRareData(LayoutObject* layoutObject) 174 inline ElementRareData::ElementRareData(LayoutObject* layoutObject)
175 : NodeRareData(layoutObject) 175 : NodeRareData(layoutObject)
176 , m_tabindex(0) 176 , m_tabindex(0)
177 , m_minimumSizeForResizing(defaultMinimumSizeForResizing()) 177 , m_minimumSizeForResizing(defaultMinimumSizeForResizing())
178 , m_classList(nullptr)
178 { 179 {
179 m_isElementRareData = true; 180 m_isElementRareData = true;
180 } 181 }
181 182
182 inline ElementRareData::~ElementRareData() 183 inline ElementRareData::~ElementRareData()
183 { 184 {
184 #if !ENABLE(OILPAN) 185 #if !ENABLE(OILPAN)
185 if (m_elementAnimations) 186 if (m_elementAnimations)
186 m_elementAnimations->dispose(); 187 m_elementAnimations->dispose();
187 if (m_intersectionObserverData) 188 if (m_intersectionObserverData)
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 inline CompositorProxiedPropertySet& ElementRareData::ensureCompositorProxiedPro pertySet() 267 inline CompositorProxiedPropertySet& ElementRareData::ensureCompositorProxiedPro pertySet()
267 { 268 {
268 if (!m_proxiedProperties) 269 if (!m_proxiedProperties)
269 m_proxiedProperties = CompositorProxiedPropertySet::create(); 270 m_proxiedProperties = CompositorProxiedPropertySet::create();
270 return *m_proxiedProperties; 271 return *m_proxiedProperties;
271 } 272 }
272 273
273 } // namespace blink 274 } // namespace blink
274 275
275 #endif // ElementRareData_h 276 #endif // ElementRareData_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/DOMTokenList.h ('k') | third_party/WebKit/Source/core/html/ClassList.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698