| Index: third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.h
|
| diff --git a/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.h b/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.h
|
| index 2e6f19cbc42c11b6196256e983f929d068558de6..8be33a1922f87eefa8b861090ded614e1843843c 100644
|
| --- a/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.h
|
| +++ b/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.h
|
| @@ -9,6 +9,7 @@
|
| #include "core/layout/ng/geometry/ng_margin_strut.h"
|
| #include "core/layout/ng/ng_block_break_token.h"
|
| #include "core/layout/ng/ng_block_node.h"
|
| +#include "core/layout/ng/ng_box_fragment.h"
|
| #include "core/layout/ng/ng_constraint_space_builder.h"
|
| #include "core/layout/ng/ng_layout_algorithm.h"
|
| #include "platform/wtf/RefPtr.h"
|
| @@ -45,11 +46,16 @@ class CORE_EXPORT NGBlockLayoutAlgorithm
|
| const NGConstraintSpace& space);
|
|
|
| // Creates a new constraint space for the current child.
|
| - RefPtr<NGConstraintSpace> CreateConstraintSpaceForChild(NGLayoutInputNode*);
|
| - void PrepareChildLayout(NGLayoutInputNode*);
|
| - void FinishChildLayout(NGLayoutInputNode*,
|
| - NGConstraintSpace*,
|
| - RefPtr<NGLayoutResult>);
|
| + RefPtr<NGConstraintSpace> CreateConstraintSpaceForChild(
|
| + const NGLogicalOffset& child_bfc_offset,
|
| + NGLayoutInputNode*);
|
| + NGLogicalOffset PrepareChildLayout(NGLayoutInputNode*);
|
| +
|
| + void FinishChildLayout(const NGConstraintSpace*, NGLayoutResult*);
|
| +
|
| + void FinishFloatChildLayout(const ComputedStyle&,
|
| + const NGConstraintSpace&,
|
| + const NGLayoutResult*);
|
|
|
| // Final adjustments before fragment creation. We need to prevent the
|
| // fragment from crossing fragmentainer boundaries, and rather create a break
|
| @@ -63,6 +69,22 @@ class CORE_EXPORT NGBlockLayoutAlgorithm
|
| NGLogicalOffset CalculateLogicalOffset(
|
| const WTF::Optional<NGLogicalOffset>& known_fragment_offset);
|
|
|
| + // Positions the fragment that establishes a new formatting context.
|
| + NGLogicalOffset PositionNewFc(const NGBoxFragment&,
|
| + const NGConstraintSpace* child_space);
|
| +
|
| + // Positions the fragment that knows its BFC offset.
|
| + NGLogicalOffset PositionWithBfcOffset(const NGBoxFragment&);
|
| +
|
| + // Positions using the parent BFC offset.
|
| + // Fragment doesn't know its offset but we can still calculate its BFC
|
| + // position because the parent fragment's BFC is known.
|
| + // Example:
|
| + // BFC Offset is known here because of the padding.
|
| + // <div style="padding: 1px">
|
| + // <div id="empty-div" style="margins: 1px"></div>
|
| + NGLogicalOffset PositionWithParentBfc();
|
| +
|
| NGConstraintSpaceBuilder space_builder_;
|
|
|
| NGBoxStrut border_and_padding_;
|
|
|