| Index: third_party/WebKit/Source/core/layout/ng/ng_multi_column_layout_algorithm.h
|
| diff --git a/third_party/WebKit/Source/core/layout/ng/ng_multi_column_layout_algorithm.h b/third_party/WebKit/Source/core/layout/ng/ng_multi_column_layout_algorithm.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..a1da6d4fe67301962b2f9f49a1d050e773b774c9
|
| --- /dev/null
|
| +++ b/third_party/WebKit/Source/core/layout/ng/ng_multi_column_layout_algorithm.h
|
| @@ -0,0 +1,63 @@
|
| +// Copyright 2017 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef NGMultiColumnLayoutAlgorithm_h
|
| +#define NGMultiColumnLayoutAlgorithm_h
|
| +
|
| +#include "core/CoreExport.h"
|
| +#include "core/layout/ng/ng_block_node.h"
|
| +#include "core/layout/ng/ng_break_token.h"
|
| +#include "core/layout/ng/ng_constraint_space_builder.h"
|
| +#include "core/layout/ng/ng_fragment_builder.h"
|
| +#include "core/layout/ng/ng_layout_algorithm.h"
|
| +
|
| +namespace blink {
|
| +
|
| +class ComputedStyle;
|
| +class NGConstraintSpace;
|
| +class NGConstraintSpaceBuilder;
|
| +
|
| +// A class for general block layout (e.g. a <div> with no special style).
|
| +// Lays out the children in sequence.
|
| +class CORE_EXPORT NGMultiColumnLayoutAlgorithm : public NGLayoutAlgorithm {
|
| + public:
|
| + // Default constructor.
|
| + // @param layout_object The layout object associated with this block.
|
| + // @param style Style reference of the block that is being laid out.
|
| + // @param first_child Our first child; the algorithm will use its NextSibling
|
| + // method to access all the children.
|
| + // @param space The constraint space which the algorithm should generate a
|
| + // fragment within.
|
| + NGMultiColumnLayoutAlgorithm(NGBlockNode* node,
|
| + NGConstraintSpace* space,
|
| + NGBreakToken* break_token = nullptr);
|
| +
|
| + RefPtr<NGLayoutResult> Layout() override;
|
| + Optional<MinMaxContentSize> ComputeMinMaxContentSize() const override;
|
| +
|
| + private:
|
| + const NGConstraintSpace& ConstraintSpace() const {
|
| + DCHECK(constraint_space_);
|
| + return *constraint_space_;
|
| + }
|
| +
|
| + const ComputedStyle& Style() const { return node_->Style(); }
|
| +
|
| + Persistent<NGBlockNode> node_;
|
| + NGConstraintSpace* constraint_space_;
|
| +
|
| + // The break token from which we are currently resuming layout.
|
| + NGBreakToken* break_token_;
|
| +
|
| + NGFragmentBuilder builder_;
|
| + NGConstraintSpaceBuilder space_builder_;
|
| +
|
| + NGBoxStrut border_and_padding_;
|
| + LayoutUnit content_size_;
|
| + LayoutUnit max_inline_size_;
|
| +};
|
| +
|
| +} // namespace blink
|
| +
|
| +#endif // NGBlockLayoutAlgorithm_h
|
|
|