1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 19:47:46 +00:00

LibWeb: Remove Layout::TableBox

Solves conflict in layout tree "type system" when elements <label> (or
<button>) can't have `display: table` because Box can't be
Layout::Label (or Layout::ButtonBox) and Layout::TableBox at the same
time.
This commit is contained in:
Aliaksandr Kalenik 2023-05-29 14:11:19 +03:00 committed by Andreas Kling
parent 269310268d
commit 258f3ea952
34 changed files with 55 additions and 118 deletions

View file

@ -8,21 +8,20 @@
#include <AK/Forward.h>
#include <LibWeb/Layout/FormattingContext.h>
#include <LibWeb/Layout/TableBox.h>
#include <LibWeb/Layout/TableWrapper.h>
namespace Web::Layout {
class TableFormattingContext final : public FormattingContext {
public:
explicit TableFormattingContext(LayoutState&, TableBox const&, FormattingContext* parent);
explicit TableFormattingContext(LayoutState&, Box const&, FormattingContext* parent);
~TableFormattingContext();
virtual void run(Box const&, LayoutMode, AvailableSpace const&) override;
virtual CSSPixels automatic_content_width() const override;
virtual CSSPixels automatic_content_height() const override;
TableBox const& table_box() const { return static_cast<TableBox const&>(context_box()); }
Box const& table_box() const { return context_box(); }
TableWrapper const& table_wrapper() const
{
return verify_cast<TableWrapper>(*table_box().containing_block());