mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:18:11 +00:00
LibWeb: Remove invalid assertion in table fixup
Previously, our code for the fixup of table rows assumed that missing cells in a table row must be sequential. This may not be true if the table contains cells have a rowspan greater than one.
This commit is contained in:
parent
3f0a77e788
commit
7a3fc621bd
3 changed files with 45 additions and 5 deletions
|
@ -727,13 +727,10 @@ static void for_each_child_box_matching(Box& parent, Matcher matcher, Callback c
|
|||
|
||||
static void fixup_row(Box& row_box, TableGrid const& table_grid, size_t row_index)
|
||||
{
|
||||
bool missing_cells_run_has_started = false;
|
||||
for (size_t column_index = 0; column_index < table_grid.column_count(); ++column_index) {
|
||||
if (table_grid.occupancy_grid().contains({ column_index, row_index })) {
|
||||
VERIFY(!missing_cells_run_has_started);
|
||||
if (table_grid.occupancy_grid().contains({ column_index, row_index }))
|
||||
continue;
|
||||
}
|
||||
missing_cells_run_has_started = true;
|
||||
|
||||
auto row_computed_values = row_box.computed_values().clone_inherited_values();
|
||||
auto& cell_computed_values = static_cast<CSS::MutableComputedValues&>(row_computed_values);
|
||||
cell_computed_values.set_display(Web::CSS::Display { CSS::DisplayInternal::TableCell });
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue