Chromium Code Reviews| Index: third_party/WebKit/Source/core/layout/ng/ng_fragment_builder.h |
| diff --git a/third_party/WebKit/Source/core/layout/ng/ng_fragment_builder.h b/third_party/WebKit/Source/core/layout/ng/ng_fragment_builder.h |
| index 0391cb1b74a359437ac3d93c94f7772c488d17cf..855e0efe93333810ec31d8b585622410786c695c 100644 |
| --- a/third_party/WebKit/Source/core/layout/ng/ng_fragment_builder.h |
| +++ b/third_party/WebKit/Source/core/layout/ng/ng_fragment_builder.h |
| @@ -5,6 +5,8 @@ |
| #ifndef NGFragmentBuilder_h |
| #define NGFragmentBuilder_h |
| +#include "core/layout/ng/ng_constraint_space.h" |
| +#include "core/layout/ng/ng_floating_object.h" |
| #include "core/layout/ng/ng_physical_fragment.h" |
| #include "core/layout/ng/ng_units.h" |
| @@ -33,6 +35,8 @@ class CORE_EXPORT NGFragmentBuilder final |
| NGFragmentBuilder& SetBlockOverflow(LayoutUnit); |
| NGFragmentBuilder& AddChild(NGFragment*, const NGLogicalOffset&); |
| + NGFragmentBuilder& AddFloatingObject(NGFloatingObject*, |
| + const NGLogicalOffset&); |
| // Builder has non-trivial out-of-flow descendant methods. |
| // These methods are building blocks for implementation of |
| @@ -80,6 +84,8 @@ class CORE_EXPORT NGFragmentBuilder final |
| NGFragmentBuilder& AddOutOfFlowDescendant(NGBlockNode*, |
| const NGStaticPosition&); |
| + NGFragmentBuilder& AddUnpositionedFloat(NGFloatingObject* floating_object); |
| + |
| void SetBreakToken(NGBreakToken* token) { |
| DCHECK(!break_token_); |
| break_token_ = token; |
| @@ -99,6 +105,11 @@ class CORE_EXPORT NGFragmentBuilder final |
| unsigned start_index, |
| unsigned end_index); |
| + // List of floats that need to be positioned. |
| + HeapVector<Member<NGFloatingObject>>& UnpositionedFloats() { |
| + return unpositioned_floats_; |
| + } |
| + |
| DECLARE_VIRTUAL_TRACE(); |
| private: |
| @@ -139,6 +150,12 @@ class CORE_EXPORT NGFragmentBuilder final |
| Vector<NGStaticPosition> out_of_flow_positions_; |
| Member<NGBreakToken> break_token_; |
|
ikilpatrick
2017/01/20 18:11:14
.nit keeping ordering consistent bt fragment/build
Gleb Lanbin
2017/01/20 21:21:59
Done.
|
| + // Floats that need to be positioned by the next in-flow fragment that can |
| + // determine its block position in space. |
| + HeapVector<Member<NGFloatingObject>> unpositioned_floats_; |
| + |
| + Vector<NGLogicalOffset> floating_object_offsets_; |
| + HeapVector<Member<NGFloatingObject>> positioned_floats_; |
| }; |
| } // namespace blink |