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

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

Issue 2872593003: [LayoutNG] Introduce NGPositionedFloat. (Closed)
Patch Set: address comments. Created 3 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 // 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 NGFragmentBuilder_h 5 #ifndef NGFragmentBuilder_h
6 #define NGFragmentBuilder_h 6 #define NGFragmentBuilder_h
7 7
8 #include "core/layout/ng/inline/ng_physical_text_fragment.h" 8 #include "core/layout/ng/inline/ng_physical_text_fragment.h"
9 #include "core/layout/ng/ng_break_token.h" 9 #include "core/layout/ng/ng_break_token.h"
10 #include "core/layout/ng/ng_constraint_space.h" 10 #include "core/layout/ng/ng_constraint_space.h"
11 #include "core/layout/ng/ng_floating_object.h" 11 #include "core/layout/ng/ng_floating_object.h"
12 #include "core/layout/ng/ng_physical_fragment.h" 12 #include "core/layout/ng/ng_physical_fragment.h"
13 #include "core/layout/ng/ng_positioned_float.h"
13 #include "platform/wtf/Allocator.h" 14 #include "platform/wtf/Allocator.h"
14 15
15 namespace blink { 16 namespace blink {
16 17
17 class NGLayoutResult; 18 class NGLayoutResult;
18 19
19 class CORE_EXPORT NGFragmentBuilder final { 20 class CORE_EXPORT NGFragmentBuilder final {
20 DISALLOW_NEW(); 21 DISALLOW_NEW();
21 22
22 public: 23 public:
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 Vector<RefPtr<NGFloatingObject>>& MutableUnpositionedFloats() { 106 Vector<RefPtr<NGFloatingObject>>& MutableUnpositionedFloats() {
106 return unpositioned_floats_; 107 return unpositioned_floats_;
107 } 108 }
108 109
109 // List of floats that need to be positioned. 110 // List of floats that need to be positioned.
110 const Vector<RefPtr<NGFloatingObject>>& UnpositionedFloats() const { 111 const Vector<RefPtr<NGFloatingObject>>& UnpositionedFloats() const {
111 return unpositioned_floats_; 112 return unpositioned_floats_;
112 } 113 }
113 114
114 // Mutable list of positioned floats, i.e. floats with logical_offset set. 115 // Mutable list of positioned floats, i.e. floats with logical_offset set.
115 Vector<RefPtr<NGFloatingObject>>& MutablePositionedFloats() { 116 Vector<NGPositionedFloat>& MutablePositionedFloats() {
116 return positioned_floats_; 117 return positioned_floats_;
117 } 118 }
118 119
119 const WTF::Optional<NGLogicalOffset>& BfcOffset() const { 120 const WTF::Optional<NGLogicalOffset>& BfcOffset() const {
120 return bfc_offset_; 121 return bfc_offset_;
121 } 122 }
122 123
123 const Vector<RefPtr<NGPhysicalFragment>>& Children() const { 124 const Vector<RefPtr<NGPhysicalFragment>>& Children() const {
124 return children_; 125 return children_;
125 } 126 }
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 WeakBoxList out_of_flow_descendant_candidates_; 167 WeakBoxList out_of_flow_descendant_candidates_;
167 Vector<OutOfFlowPlacement> out_of_flow_candidate_placements_; 168 Vector<OutOfFlowPlacement> out_of_flow_candidate_placements_;
168 169
169 WeakBoxList out_of_flow_descendants_; 170 WeakBoxList out_of_flow_descendants_;
170 Vector<NGStaticPosition> out_of_flow_positions_; 171 Vector<NGStaticPosition> out_of_flow_positions_;
171 172
172 // Floats that need to be positioned by the next in-flow fragment that can 173 // Floats that need to be positioned by the next in-flow fragment that can
173 // determine its block position in space. 174 // determine its block position in space.
174 Vector<RefPtr<NGFloatingObject>> unpositioned_floats_; 175 Vector<RefPtr<NGFloatingObject>> unpositioned_floats_;
175 176
176 Vector<RefPtr<NGFloatingObject>> positioned_floats_; 177 Vector<NGPositionedFloat> positioned_floats_;
177 178
178 WTF::Optional<NGLogicalOffset> bfc_offset_; 179 WTF::Optional<NGLogicalOffset> bfc_offset_;
179 NGMarginStrut end_margin_strut_; 180 NGMarginStrut end_margin_strut_;
180 }; 181 };
181 182
182 } // namespace blink 183 } // namespace blink
183 184
184 #endif // NGFragmentBuilder 185 #endif // NGFragmentBuilder
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698