// Copyright 2016 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_LAYOUT_ALGORITHM_H_ #define THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_LAYOUT_ALGORITHM_H_ #include "third_party/blink/renderer/core/core_export.h" #include "third_party/blink/renderer/core/layout/block_node.h" #include "third_party/blink/renderer/core/layout/constraint_space.h" #include "third_party/blink/renderer/core/layout/constraint_space_builder.h" #include "third_party/blink/renderer/core/layout/fragmentation_utils.h" #include "third_party/blink/renderer/core/layout/min_max_sizes.h" #include "third_party/blink/renderer/platform/wtf/allocator/allocator.h" namespace blink { class ColumnSpannerPath; class ComputedStyle; class EarlyBreak; class LayoutResult; // Parameters to pass when creating a layout algorithm for a block node. struct LayoutAlgorithmParams { … }; // Base class template for all layout algorithms. // // Subclassed template specializations (actual layout algorithms) are required // to define the following two functions: // // MinMaxSizesResult ComputeMinMaxSizes(const MinMaxSizesFloatInput&); // const LayoutResult* Layout(); // // ComputeMinMaxSizes() should compute the min-content and max-content intrinsic // sizes for the given box. The result should not take any min-width, max-width // or width properties into account. // // Layout() is the actual layout function. Lays out the children and descendants // within the constraints given by the ConstraintSpace. Returns a layout result // with the resulting layout information. template <typename InputNodeType, typename BoxFragmentBuilderType, typename BreakTokenType> class CORE_EXPORT LayoutAlgorithm { … }; } // namespace blink #endif // THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_LAYOUT_ALGORITHM_H_