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

Side by Side Diff: third_party/WebKit/Source/core/layout/ng/ng_physical_fragment.h

Issue 2540653003: Implement collection of out-of-flow descendants (Closed)
Patch Set: Collection of out-of-flow descendants Created 4 years 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 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NGPhysicalFragment_h 5 #ifndef NGPhysicalFragment_h
6 #define NGPhysicalFragment_h 6 #define NGPhysicalFragment_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "core/layout/ng/ng_physical_fragment_base.h" 9 #include "core/layout/ng/ng_physical_fragment_base.h"
10 #include "core/layout/ng/ng_units.h" 10 #include "core/layout/ng/ng_units.h"
11 #include "platform/heap/Handle.h" 11 #include "platform/heap/Handle.h"
12 12
13 namespace blink { 13 namespace blink {
14 14
15 class NGBlockNode; 15 class NGBlockNode;
16 16
17 class CORE_EXPORT NGPhysicalFragment final : public NGPhysicalFragmentBase { 17 class CORE_EXPORT NGPhysicalFragment final : public NGPhysicalFragmentBase {
18 public: 18 public:
19 // This modifies the passed-in children vector. 19 // This modifies the passed-in children vector.
20 NGPhysicalFragment( 20 NGPhysicalFragment(
21 NGPhysicalSize size, 21 NGPhysicalSize size,
22 NGPhysicalSize overflow, 22 NGPhysicalSize overflow,
23 HeapVector<Member<const NGPhysicalFragmentBase>>& children, 23 HeapVector<Member<const NGPhysicalFragmentBase>>& children,
24 HeapLinkedHashSet<WeakMember<NGBlockNode>>& out_of_flow_descendants, 24 HeapLinkedHashSet<WeakMember<NGBlockNode>>& out_of_flow_descendants,
25 Vector<NGLogicalOffset> out_of_flow_offsets, 25 Vector<NGCorner> out_of_flow_offsets,
26 NGMarginStrut margin_strut); 26 NGMarginStrut margin_strut);
27 27
28 const HeapVector<Member<const NGPhysicalFragmentBase>>& Children() const { 28 const HeapVector<Member<const NGPhysicalFragmentBase>>& Children() const {
29 return children_; 29 return children_;
30 } 30 }
31 31
32 const HeapLinkedHashSet<WeakMember<NGBlockNode>>& OutOfFlowDescendants() 32 const HeapLinkedHashSet<WeakMember<NGBlockNode>>& OutOfFlowDescendants()
33 const { 33 const {
34 return out_of_flow_descendants_; 34 return out_of_flow_descendants_;
35 } 35 }
36 36
37 const Vector<NGLogicalOffset>& OutOfFlowOffsets() const { 37 const Vector<NGCorner>& OutOfFlowOffsets() const {
ikilpatrick 2016/12/02 21:06:13 offsets isn't a good name now, can you fix now or
atotic 2016/12/02 22:19:37 done
38 return out_of_flow_offsets_; 38 return out_of_flow_offsets_;
39 } 39 }
40 40
41 NGMarginStrut MarginStrut() const { return margin_strut_; } 41 NGMarginStrut MarginStrut() const { return margin_strut_; }
42 42
43 DECLARE_TRACE_AFTER_DISPATCH(); 43 DECLARE_TRACE_AFTER_DISPATCH();
44 44
45 private: 45 private:
46 HeapVector<Member<const NGPhysicalFragmentBase>> children_; 46 HeapVector<Member<const NGPhysicalFragmentBase>> children_;
47 HeapLinkedHashSet<WeakMember<NGBlockNode>> out_of_flow_descendants_; 47 HeapLinkedHashSet<WeakMember<NGBlockNode>> out_of_flow_descendants_;
48 Vector<NGLogicalOffset> out_of_flow_offsets_; 48 Vector<NGCorner> out_of_flow_offsets_;
49 NGMarginStrut margin_strut_; 49 NGMarginStrut margin_strut_;
50 }; 50 };
51 51
52 WILL_NOT_BE_EAGERLY_TRACED_CLASS(NGPhysicalFragment); 52 WILL_NOT_BE_EAGERLY_TRACED_CLASS(NGPhysicalFragment);
53 53
54 DEFINE_TYPE_CASTS(NGPhysicalFragment, 54 DEFINE_TYPE_CASTS(NGPhysicalFragment,
55 NGPhysicalFragmentBase, 55 NGPhysicalFragmentBase,
56 fragment, 56 fragment,
57 fragment->Type() == NGPhysicalFragmentBase::kFragmentBox, 57 fragment->Type() == NGPhysicalFragmentBase::kFragmentBox,
58 fragment.Type() == NGPhysicalFragmentBase::kFragmentBox); 58 fragment.Type() == NGPhysicalFragmentBase::kFragmentBox);
59 59
60 } // namespace blink 60 } // namespace blink
61 61
62 #endif // NGPhysicalFragment_h 62 #endif // NGPhysicalFragment_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698