summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/renderer/core/layout/grid_layout_utils.h
blob: 2a0cfb82e16470811ef59dd2816a2b4b91e3b2cf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// 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 THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_GRID_LAYOUT_UTILS_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_GRID_LAYOUT_UTILS_H_

#include "third_party/blink/renderer/core/layout/layout_box.h"

namespace blink {

enum GridAxis { kGridRowAxis, kGridColumnAxis };

class LayoutGrid;

class GridLayoutUtils {
 public:
  static LayoutUnit MarginLogicalWidthForChild(const LayoutGrid&,
                                               const LayoutBox&);
  static LayoutUnit MarginLogicalHeightForChild(const LayoutGrid&,
                                                const LayoutBox&);
  static bool IsOrthogonalChild(const LayoutGrid&, const LayoutBox&);
  static GridTrackSizingDirection FlowAwareDirectionForChild(
      const LayoutGrid&,
      const LayoutBox&,
      GridTrackSizingDirection);
  static bool HasOverrideContainingBlockContentSizeForChild(
      const LayoutBox&,
      GridTrackSizingDirection);
  static LayoutUnit OverrideContainingBlockContentSizeForChild(
      const LayoutBox&,
      GridTrackSizingDirection);
};

}  // namespace blink

#endif  // THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_GRID_LAYOUT_UTILS_H_