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..f9b65cdff5e974b6ae34bb5e688c1bc59d98a3f5 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: |
@@ -138,6 +149,13 @@ class CORE_EXPORT NGFragmentBuilder final |
WeakBoxList out_of_flow_descendants_; |
Vector<NGStaticPosition> out_of_flow_positions_; |
+ // 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_; |
+ |
Member<NGBreakToken> break_token_; |
}; |