chromium/third_party/blink/renderer/core/layout/grid/grid_sizing_tree.h

// Copyright 2021 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_GRID_GRID_SIZING_TREE_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_GRID_GRID_SIZING_TREE_H_

#include "third_party/blink/renderer/core/core_export.h"
#include "third_party/blink/renderer/core/layout/grid/grid_data.h"
#include "third_party/blink/renderer/core/layout/grid/grid_item.h"

namespace blink {

// In subgrid, we allow "subgridded items" to be considered by the sizing
// algorithm of an ancestor grid that may not be its parent grid.
//
// For a given subgridded item, this class encapsulates a pointer to its
// |GridItemData| in the context of its parent grid (i.e., its properties are
// relative to its parent's area and writing mode) and a pointer to the actual
// |GridLayoutData| of the grid that directly contains the subgridded item.
class SubgriddedItemData {};

constexpr SubgriddedItemData kNoSubgriddedItemData;

// This class represents a grid tree (see `grid_subtree.h`) and contains the
// necessary data to perform the track sizing algorithm of its nested subgrids.
class CORE_EXPORT GridSizingTree {};

// This class represents a subtree in a `GridSizingTree` and provides seamless
// traversal over the tree and access to the sizing tree's lookup methods.
class GridSizingSubtree
    : public GridSubtree<GridSizingSubtree, const GridSizingTree*> {};

constexpr GridSizingSubtree kNoGridSizingSubtree;

}  // namespace blink

#endif  // THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_GRID_GRID_SIZING_TREE_H_