LibWeb/CSS: Implement the empty-cells property

This property sets whether table borders and backgrounds are painted
if a given table cell has no visible content.
This commit is contained in:
Tim Ledbetter 2025-06-18 12:28:18 +01:00 committed by Sam Atkins
commit e0af205d69
Notes: github-actions[bot] 2025-06-18 13:56:15 +00:00
22 changed files with 253 additions and 10 deletions

View file

@ -378,6 +378,8 @@ void paint_table_borders(PaintContext& context, PaintableBox const& table_painta
auto cell_coordinates_to_device_rect = snap_cells_to_device_coordinates(cell_coordinates_to_box, row_count, column_count, context);
for (auto const& cell_box : cell_boxes) {
if (table_paintable.computed_values().border_collapse() == CSS::BorderCollapse::Separate) {
if (cell_box.computed_values().empty_cells() == CSS::EmptyCells::Hide && !cell_box.has_children())
continue;
paint_separate_cell_borders(cell_box, cell_coordinates_to_device_rect, context);
continue;
}