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

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

Issue 2921463004: [LayoutNG] PODify NGLayoutInputNode and sub-classes. (Closed)
Patch Set: new ng-bot expectations Created 3 years, 6 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 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 NGLayoutResult_h 5 #ifndef NGLayoutResult_h
6 #define NGLayoutResult_h 6 #define NGLayoutResult_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "core/layout/ng/geometry/ng_static_position.h" 9 #include "core/layout/ng/geometry/ng_static_position.h"
10 #include "core/layout/ng/ng_block_node.h" 10 #include "core/layout/ng/ng_block_node.h"
(...skipping 14 matching lines...) Expand all
25 // NGFragment et al. 25 // NGFragment et al.
26 class CORE_EXPORT NGLayoutResult : public RefCounted<NGLayoutResult> { 26 class CORE_EXPORT NGLayoutResult : public RefCounted<NGLayoutResult> {
27 public: 27 public:
28 RefPtr<NGPhysicalFragment> PhysicalFragment() const { 28 RefPtr<NGPhysicalFragment> PhysicalFragment() const {
29 return physical_fragment_; 29 return physical_fragment_;
30 } 30 }
31 RefPtr<NGPhysicalFragment>& MutablePhysicalFragment() { 31 RefPtr<NGPhysicalFragment>& MutablePhysicalFragment() {
32 return physical_fragment_; 32 return physical_fragment_;
33 } 33 }
34 34
35 const HeapLinkedHashSet<WeakMember<NGBlockNode>>& OutOfFlowDescendants() 35 const Vector<NGBlockNode>& OutOfFlowDescendants() const {
36 const {
37 return out_of_flow_descendants_; 36 return out_of_flow_descendants_;
38 } 37 }
39 38
40 const Vector<NGStaticPosition>& OutOfFlowPositions() const { 39 const Vector<NGStaticPosition>& OutOfFlowPositions() const {
41 return out_of_flow_positions_; 40 return out_of_flow_positions_;
42 } 41 }
43 42
44 // List of floats that need to be positioned by the next in-flow child that 43 // List of floats that need to be positioned by the next in-flow child that
45 // can determine its position in space. 44 // can determine its position in space.
46 // Use case example where it may be needed: 45 // Use case example where it may be needed:
47 // <div><float></div> 46 // <div><float></div>
48 // <div style="margin-top: 10px; height: 20px"></div> 47 // <div style="margin-top: 10px; height: 20px"></div>
49 // The float cannot be positioned right away inside of the 1st div because 48 // The float cannot be positioned right away inside of the 1st div because
50 // the vertical position is not known at that moment. It will be known only 49 // the vertical position is not known at that moment. It will be known only
51 // after the 2nd div collapses its margin with its parent. 50 // after the 2nd div collapses its margin with its parent.
52 const Vector<RefPtr<NGUnpositionedFloat>>& UnpositionedFloats() const { 51 const Vector<RefPtr<NGUnpositionedFloat>>& UnpositionedFloats() const {
53 return unpositioned_floats_; 52 return unpositioned_floats_;
54 } 53 }
55 54
56 private: 55 private:
57 friend class NGFragmentBuilder; 56 friend class NGFragmentBuilder;
58 57
59 NGLayoutResult(PassRefPtr<NGPhysicalFragment> physical_fragment, 58 NGLayoutResult(PassRefPtr<NGPhysicalFragment> physical_fragment,
60 PersistentHeapLinkedHashSet<WeakMember<NGBlockNode>>& 59 Vector<NGBlockNode>& out_of_flow_descendants,
61 out_of_flow_descendants,
62 Vector<NGStaticPosition> out_of_flow_positions, 60 Vector<NGStaticPosition> out_of_flow_positions,
63 Vector<RefPtr<NGUnpositionedFloat>>& unpositioned_floats); 61 Vector<RefPtr<NGUnpositionedFloat>>& unpositioned_floats);
64 62
65 RefPtr<NGPhysicalFragment> physical_fragment_; 63 RefPtr<NGPhysicalFragment> physical_fragment_;
66 PersistentHeapLinkedHashSet<WeakMember<NGBlockNode>> out_of_flow_descendants_; 64 Vector<NGBlockNode> out_of_flow_descendants_;
67 Vector<NGStaticPosition> out_of_flow_positions_; 65 Vector<NGStaticPosition> out_of_flow_positions_;
68 Vector<RefPtr<NGUnpositionedFloat>> unpositioned_floats_; 66 Vector<RefPtr<NGUnpositionedFloat>> unpositioned_floats_;
69 }; 67 };
70 68
71 } // namespace blink 69 } // namespace blink
72 70
73 #endif // NGLayoutResult_h 71 #endif // NGLayoutResult_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698