summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/Layout/GridFormattingContext.cpp
blob: 8f13db2e4b055e87d9c789ce0da278e421b67f41 (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
/*
 * Copyright (c) 2022, Martin Falisse <mfalisse@outlook.com>
 *
 * SPDX-License-Identifier: BSD-2-Clause
 */

#include <LibWeb/Layout/Box.h>
#include <LibWeb/Layout/GridFormattingContext.h>

namespace Web::Layout {

GridFormattingContext::GridFormattingContext(LayoutState& state, BlockContainer const& block_container, FormattingContext* parent)
    : BlockFormattingContext(state, block_container, parent)
{
}

GridFormattingContext::~GridFormattingContext() = default;

void GridFormattingContext::run(Box const& box, LayoutMode)
{
    box.for_each_child_of_type<Box>([&](Box& child_box) {
        (void)layout_inside(child_box, LayoutMode::Normal);
    });
}

}