TableFormattingContext.h 658 B

1234567891011121314151617181920212223242526
  1. /*
  2. * Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <AK/Forward.h>
  8. #include <LibWeb/Layout/BlockFormattingContext.h>
  9. namespace Web::Layout {
  10. class TableFormattingContext final : public BlockFormattingContext {
  11. public:
  12. explicit TableFormattingContext(FormattingState&, BlockContainer const&, FormattingContext* parent);
  13. ~TableFormattingContext();
  14. virtual void run(Box const&, LayoutMode) override;
  15. private:
  16. void calculate_column_widths(Box const& row, Vector<float>& column_widths);
  17. void layout_row(Box const& row, Vector<float>& column_widths);
  18. };
  19. }