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

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

Issue 2814603002: Move LayoutObject to satellite NodeLayoutData that hangs from a Node. (Closed)
Patch Set: Question Created 3 years, 8 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 26 matching lines...) Expand all
37 #include "core/dom/PseudoElementData.h" 37 #include "core/dom/PseudoElementData.h"
38 #include "core/dom/custom/CustomElementDefinition.h" 38 #include "core/dom/custom/CustomElementDefinition.h"
39 #include "core/dom/custom/V0CustomElementDefinition.h" 39 #include "core/dom/custom/V0CustomElementDefinition.h"
40 #include "core/dom/shadow/ElementShadow.h" 40 #include "core/dom/shadow/ElementShadow.h"
41 #include "core/html/ClassList.h" 41 #include "core/html/ClassList.h"
42 #include "platform/heap/Handle.h" 42 #include "platform/heap/Handle.h"
43 #include "wtf/HashSet.h" 43 #include "wtf/HashSet.h"
44 44
45 namespace blink { 45 namespace blink {
46 46
47 class LayoutObject; 47 class NodeLayoutData;
48 class CompositorProxiedPropertySet; 48 class CompositorProxiedPropertySet;
49 class ResizeObservation; 49 class ResizeObservation;
50 class ResizeObserver; 50 class ResizeObserver;
51 51
52 class ElementRareData : public NodeRareData { 52 class ElementRareData : public NodeRareData {
53 public: 53 public:
54 static ElementRareData* Create(LayoutObject* layout_object) { 54 static ElementRareData* Create() {
55 return new ElementRareData(layout_object); 55 return new ElementRareData();
56 } 56 }
57 57
58 ~ElementRareData(); 58 ~ElementRareData();
59 59
60 void SetPseudoElement(PseudoId, PseudoElement*); 60 void SetPseudoElement(PseudoId, PseudoElement*);
61 PseudoElement* GetPseudoElement(PseudoId) const; 61 PseudoElement* GetPseudoElement(PseudoId) const;
62 62
63 void SetTabIndexExplicitly() { 63 void SetTabIndexExplicitly() {
64 SetElementFlag(kTabIndexWasSetExplicitly, true); 64 SetElementFlag(kTabIndexWasSetExplicitly, true);
65 } 65 }
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 219
220 RefPtr<ComputedStyle> computed_style_; 220 RefPtr<ComputedStyle> computed_style_;
221 // TODO(davaajav):remove this field when v0 custom elements are deprecated 221 // TODO(davaajav):remove this field when v0 custom elements are deprecated
222 Member<V0CustomElementDefinition> v0_custom_element_definition_; 222 Member<V0CustomElementDefinition> v0_custom_element_definition_;
223 Member<CustomElementDefinition> custom_element_definition_; 223 Member<CustomElementDefinition> custom_element_definition_;
224 224
225 Member<PseudoElementData> pseudo_element_data_; 225 Member<PseudoElementData> pseudo_element_data_;
226 226
227 Member<AccessibleNode> accessible_node_; 227 Member<AccessibleNode> accessible_node_;
228 228
229 explicit ElementRareData(LayoutObject*); 229 explicit ElementRareData();
230 }; 230 };
231 231
232 DEFINE_TRAIT_FOR_TRACE_WRAPPERS(ElementRareData); 232 DEFINE_TRAIT_FOR_TRACE_WRAPPERS(ElementRareData);
233 233
234 inline LayoutSize DefaultMinimumSizeForResizing() { 234 inline LayoutSize DefaultMinimumSizeForResizing() {
235 return LayoutSize(LayoutUnit::Max(), LayoutUnit::Max()); 235 return LayoutSize(LayoutUnit::Max(), LayoutUnit::Max());
236 } 236 }
237 237
238 inline ElementRareData::ElementRareData(LayoutObject* layout_object) 238 inline ElementRareData::ElementRareData()
239 : NodeRareData(layout_object), 239 : NodeRareData(),
240 minimum_size_for_resizing_(DefaultMinimumSizeForResizing()), 240 minimum_size_for_resizing_(DefaultMinimumSizeForResizing()),
241 class_list_(nullptr) { 241 class_list_(nullptr) {
242 is_element_rare_data_ = true; 242 is_element_rare_data_ = true;
243 } 243 }
244 244
245 inline ElementRareData::~ElementRareData() { 245 inline ElementRareData::~ElementRareData() {
246 DCHECK(!pseudo_element_data_); 246 DCHECK(!pseudo_element_data_);
247 } 247 }
248 248
249 inline bool ElementRareData::HasPseudoElements() const { 249 inline bool ElementRareData::HasPseudoElements() const {
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 inline CompositorProxiedPropertySet& 286 inline CompositorProxiedPropertySet&
287 ElementRareData::EnsureCompositorProxiedPropertySet() { 287 ElementRareData::EnsureCompositorProxiedPropertySet() {
288 if (!proxied_properties_) 288 if (!proxied_properties_)
289 proxied_properties_ = CompositorProxiedPropertySet::Create(); 289 proxied_properties_ = CompositorProxiedPropertySet::Create();
290 return *proxied_properties_; 290 return *proxied_properties_;
291 } 291 }
292 292
293 } // namespace blink 293 } // namespace blink
294 294
295 #endif // ElementRareData_h 295 #endif // ElementRareData_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/Node.h » ('j') | third_party/WebKit/Source/core/dom/Node.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698