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

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

Issue 1548523002: Use Document, rather than document element, for implicit root. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@intersection-observer
Patch Set: Nits, comments, rebaseline Created 4 years, 11 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,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details. 13 * Library General Public License for more details.
14 * 14 *
15 * You should have received a copy of the GNU Library General Public License 15 * You should have received a copy of the GNU Library General Public License
16 * along with this library; see the file COPYING.LIB. If not, write to 16 * along with this library; see the file COPYING.LIB. If not, write to
17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA. 18 * Boston, MA 02110-1301, USA.
19 * 19 *
20 */ 20 */
21 21
22 #ifndef ElementRareData_h 22 #ifndef ElementRareData_h
23 #define ElementRareData_h 23 #define ElementRareData_h
24 24
25 #include "core/animation/ElementAnimations.h" 25 #include "core/animation/ElementAnimations.h"
26 #include "core/dom/Attr.h" 26 #include "core/dom/Attr.h"
27 #include "core/dom/CompositorProxiedPropertySet.h" 27 #include "core/dom/CompositorProxiedPropertySet.h"
28 #include "core/dom/DatasetDOMStringMap.h" 28 #include "core/dom/DatasetDOMStringMap.h"
29 #include "core/dom/ElementIntersectionObserverData.h"
30 #include "core/dom/NamedNodeMap.h" 29 #include "core/dom/NamedNodeMap.h"
30 #include "core/dom/NodeIntersectionObserverData.h"
31 #include "core/dom/NodeRareData.h" 31 #include "core/dom/NodeRareData.h"
32 #include "core/dom/PseudoElement.h" 32 #include "core/dom/PseudoElement.h"
33 #include "core/dom/custom/CustomElementDefinition.h" 33 #include "core/dom/custom/CustomElementDefinition.h"
34 #include "core/dom/shadow/ElementShadow.h" 34 #include "core/dom/shadow/ElementShadow.h"
35 #include "core/html/ClassList.h" 35 #include "core/html/ClassList.h"
36 #include "core/style/StyleInheritedData.h" 36 #include "core/style/StyleInheritedData.h"
37 #include "platform/heap/Handle.h" 37 #include "platform/heap/Handle.h"
38 #include "wtf/HashSet.h" 38 #include "wtf/HashSet.h"
39 #include "wtf/OwnPtr.h" 39 #include "wtf/OwnPtr.h"
40 40
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 void decrementCompositorProxiedProperties(uint32_t properties); 118 void decrementCompositorProxiedProperties(uint32_t properties);
119 CompositorProxiedPropertySet* proxiedPropertyCounts() const { return m_proxi edProperties.get(); } 119 CompositorProxiedPropertySet* proxiedPropertyCounts() const { return m_proxi edProperties.get(); }
120 120
121 void setCustomElementDefinition(PassRefPtrWillBeRawPtr<CustomElementDefiniti on> definition) { m_customElementDefinition = definition; } 121 void setCustomElementDefinition(PassRefPtrWillBeRawPtr<CustomElementDefiniti on> definition) { m_customElementDefinition = definition; }
122 CustomElementDefinition* customElementDefinition() const { return m_customEl ementDefinition.get(); } 122 CustomElementDefinition* customElementDefinition() const { return m_customEl ementDefinition.get(); }
123 123
124 AttrNodeList& ensureAttrNodeList(); 124 AttrNodeList& ensureAttrNodeList();
125 AttrNodeList* attrNodeList() { return m_attrNodeList.get(); } 125 AttrNodeList* attrNodeList() { return m_attrNodeList.get(); }
126 void removeAttrNodeList() { m_attrNodeList.clear(); } 126 void removeAttrNodeList() { m_attrNodeList.clear(); }
127 127
128 ElementIntersectionObserverData* intersectionObserverData() const { return m _intersectionObserverData.get(); } 128 NodeIntersectionObserverData* intersectionObserverData() const { return m_in tersectionObserverData.get(); }
129 ElementIntersectionObserverData& ensureIntersectionObserverData() 129 NodeIntersectionObserverData& ensureIntersectionObserverData()
130 { 130 {
131 if (!m_intersectionObserverData) 131 if (!m_intersectionObserverData)
132 m_intersectionObserverData = new ElementIntersectionObserverData(); 132 m_intersectionObserverData = new NodeIntersectionObserverData();
133 return *m_intersectionObserverData; 133 return *m_intersectionObserverData;
134 } 134 }
135 135
136 DECLARE_TRACE_AFTER_DISPATCH(); 136 DECLARE_TRACE_AFTER_DISPATCH();
137 137
138 private: 138 private:
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<ClassList> m_classList; 148 OwnPtrWillBeMember<ClassList> m_classList;
149 OwnPtrWillBeMember<ElementShadow> m_shadow; 149 OwnPtrWillBeMember<ElementShadow> m_shadow;
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<ElementIntersectionObserverData> m_intersectionObserv erData; 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*);
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 inline CompositorProxiedPropertySet& ElementRareData::ensureCompositorProxiedPro pertySet() 266 inline CompositorProxiedPropertySet& ElementRareData::ensureCompositorProxiedPro pertySet()
267 { 267 {
268 if (!m_proxiedProperties) 268 if (!m_proxiedProperties)
269 m_proxiedProperties = CompositorProxiedPropertySet::create(); 269 m_proxiedProperties = CompositorProxiedPropertySet::create();
270 return *m_proxiedProperties; 270 return *m_proxiedProperties;
271 } 271 }
272 272
273 } // namespace 273 } // namespace
274 274
275 #endif // ElementRareData_h 275 #endif // ElementRareData_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698