1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 07:58:11 +00:00

LibWeb: Add GridFormattingContext

This commit is contained in:
martinfalisse 2022-08-23 10:36:27 +02:00 committed by Andreas Kling
parent e4541d83d3
commit e4c5799026
5 changed files with 61 additions and 2 deletions

View file

@ -0,0 +1,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);
});
}
}