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

LibWeb: Start implementation of CSS Table 3 spec

Here I try to address bug where content of table overflows
it's width (hacker news is an example of such site) by
reimplementing some parts of table formatting context.

Now TFC implements first steps of:
https://www.w3.org/TR/css-tables-3/#table-layout-algorithm
but column width and row height distribution steps are
still very incomplete.
This commit is contained in:
Aliaksandr Kalenik 2022-12-04 22:39:38 +03:00 committed by Andreas Kling
parent 4e3b965d7f
commit 1c6783cd7e
4 changed files with 260 additions and 190 deletions

View file

@ -18,17 +18,4 @@ TableRowGroupBox::TableRowGroupBox(DOM::Document& document, DOM::Element* elemen
TableRowGroupBox::~TableRowGroupBox() = default;
size_t TableRowGroupBox::column_count() const
{
size_t table_column_count = 0;
for_each_child_of_type<TableRowBox>([&](auto& row) {
size_t row_column_count = 0;
row.template for_each_child_of_type<TableCellBox>([&](auto& cell) {
row_column_count += cell.colspan();
});
table_column_count = max(table_column_count, row_column_count);
});
return table_column_count;
}
}