GridFormattingContext.cpp 669 B

1234567891011121314151617181920212223242526
  1. /*
  2. * Copyright (c) 2022, Martin Falisse <mfalisse@outlook.com>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #include <LibWeb/Layout/Box.h>
  7. #include <LibWeb/Layout/GridFormattingContext.h>
  8. namespace Web::Layout {
  9. GridFormattingContext::GridFormattingContext(LayoutState& state, BlockContainer const& block_container, FormattingContext* parent)
  10. : BlockFormattingContext(state, block_container, parent)
  11. {
  12. }
  13. GridFormattingContext::~GridFormattingContext() = default;
  14. void GridFormattingContext::run(Box const& box, LayoutMode)
  15. {
  16. box.for_each_child_of_type<Box>([&](Box& child_box) {
  17. (void)layout_inside(child_box, LayoutMode::Normal);
  18. });
  19. }
  20. }