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

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

Issue 2005593002: Initial ResizeObserver implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 17 matching lines...) Expand all
28 #include "core/dom/CompositorProxiedPropertySet.h" 28 #include "core/dom/CompositorProxiedPropertySet.h"
29 #include "core/dom/DatasetDOMStringMap.h" 29 #include "core/dom/DatasetDOMStringMap.h"
30 #include "core/dom/NamedNodeMap.h" 30 #include "core/dom/NamedNodeMap.h"
31 #include "core/dom/NodeIntersectionObserverData.h" 31 #include "core/dom/NodeIntersectionObserverData.h"
32 #include "core/dom/NodeRareData.h" 32 #include "core/dom/NodeRareData.h"
33 #include "core/dom/PseudoElement.h" 33 #include "core/dom/PseudoElement.h"
34 #include "core/dom/PseudoElementData.h" 34 #include "core/dom/PseudoElementData.h"
35 #include "core/dom/custom/V0CustomElementDefinition.h" 35 #include "core/dom/custom/V0CustomElementDefinition.h"
36 #include "core/dom/shadow/ElementShadow.h" 36 #include "core/dom/shadow/ElementShadow.h"
37 #include "core/html/ClassList.h" 37 #include "core/html/ClassList.h"
38 #include "core/observer/ResizeObservation.h"
szager1 2016/05/23 19:49:10 Move this to ElementRareData.cpp, and add a forwar
atotic1 2016/05/25 00:15:52 Done.
38 #include "core/style/StyleInheritedData.h" 39 #include "core/style/StyleInheritedData.h"
39 #include "platform/heap/Handle.h" 40 #include "platform/heap/Handle.h"
40 #include "wtf/HashSet.h" 41 #include "wtf/HashSet.h"
41 #include "wtf/OwnPtr.h" 42 #include "wtf/OwnPtr.h"
42 43
43 namespace blink { 44 namespace blink {
44 45
45 class HTMLElement; 46 class HTMLElement;
46 class CompositorProxiedPropertySet; 47 class CompositorProxiedPropertySet;
47 48
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 void removeAttrNodeList() { m_attrNodeList.clear(); } 132 void removeAttrNodeList() { m_attrNodeList.clear(); }
132 133
133 NodeIntersectionObserverData* intersectionObserverData() const { return m_in tersectionObserverData.get(); } 134 NodeIntersectionObserverData* intersectionObserverData() const { return m_in tersectionObserverData.get(); }
134 NodeIntersectionObserverData& ensureIntersectionObserverData() 135 NodeIntersectionObserverData& ensureIntersectionObserverData()
135 { 136 {
136 if (!m_intersectionObserverData) 137 if (!m_intersectionObserverData)
137 m_intersectionObserverData = new NodeIntersectionObserverData(); 138 m_intersectionObserverData = new NodeIntersectionObserverData();
138 return *m_intersectionObserverData; 139 return *m_intersectionObserverData;
139 } 140 }
140 141
142 ResizeObservationSet* resizeObserverData() const { return m_resizeObserverDa ta; }
143 ResizeObservationSet& ensureResizeObserverData();
144
141 DECLARE_TRACE_AFTER_DISPATCH(); 145 DECLARE_TRACE_AFTER_DISPATCH();
142 146
143 DECLARE_TRACE_WRAPPERS_AFTER_DISPATCH(); 147 DECLARE_TRACE_WRAPPERS_AFTER_DISPATCH();
144 148
145 private: 149 private:
146 CompositorProxiedPropertySet& ensureCompositorProxiedPropertySet(); 150 CompositorProxiedPropertySet& ensureCompositorProxiedPropertySet();
147 void clearCompositorProxiedPropertySet() { m_proxiedProperties = nullptr; } 151 void clearCompositorProxiedPropertySet() { m_proxiedProperties = nullptr; }
148 152
149 short m_tabindex; 153 short m_tabindex;
150 154
151 LayoutSize m_minimumSizeForResizing; 155 LayoutSize m_minimumSizeForResizing;
152 IntSize m_savedLayerScrollOffset; 156 IntSize m_savedLayerScrollOffset;
153 157
154 Member<DatasetDOMStringMap> m_dataset; 158 Member<DatasetDOMStringMap> m_dataset;
155 Member<ElementShadow> m_shadow; 159 Member<ElementShadow> m_shadow;
156 Member<ClassList> m_classList; 160 Member<ClassList> m_classList;
157 Member<NamedNodeMap> m_attributeMap; 161 Member<NamedNodeMap> m_attributeMap;
158 Member<AttrNodeList> m_attrNodeList; 162 Member<AttrNodeList> m_attrNodeList;
159 Member<InlineCSSStyleDeclaration> m_cssomWrapper; 163 Member<InlineCSSStyleDeclaration> m_cssomWrapper;
160 Member<InlineStylePropertyMap> m_cssomMapWrapper; 164 Member<InlineStylePropertyMap> m_cssomMapWrapper;
161 OwnPtr<CompositorProxiedPropertySet> m_proxiedProperties; 165 OwnPtr<CompositorProxiedPropertySet> m_proxiedProperties;
162 166
163 Member<ElementAnimations> m_elementAnimations; 167 Member<ElementAnimations> m_elementAnimations;
164 Member<NodeIntersectionObserverData> m_intersectionObserverData; 168 Member<NodeIntersectionObserverData> m_intersectionObserverData;
169 Member<ResizeObservationSet> m_resizeObserverData;
165 170
166 RefPtr<ComputedStyle> m_computedStyle; 171 RefPtr<ComputedStyle> m_computedStyle;
167 Member<V0CustomElementDefinition> m_customElementDefinition; 172 Member<V0CustomElementDefinition> m_customElementDefinition;
168 173
169 Member<PseudoElementData> m_pseudoElementData; 174 Member<PseudoElementData> m_pseudoElementData;
170 175
171 explicit ElementRareData(LayoutObject*); 176 explicit ElementRareData(LayoutObject*);
172 }; 177 };
173 178
174 inline LayoutSize defaultMinimumSizeForResizing() 179 inline LayoutSize defaultMinimumSizeForResizing()
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 inline CompositorProxiedPropertySet& ElementRareData::ensureCompositorProxiedPro pertySet() 237 inline CompositorProxiedPropertySet& ElementRareData::ensureCompositorProxiedPro pertySet()
233 { 238 {
234 if (!m_proxiedProperties) 239 if (!m_proxiedProperties)
235 m_proxiedProperties = CompositorProxiedPropertySet::create(); 240 m_proxiedProperties = CompositorProxiedPropertySet::create();
236 return *m_proxiedProperties; 241 return *m_proxiedProperties;
237 } 242 }
238 243
239 } // namespace blink 244 } // namespace blink
240 245
241 #endif // ElementRareData_h 246 #endif // ElementRareData_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698