mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:27:46 +00:00
LibWeb: Verify that table cells have a paintable when collecting them
Replicate the more conservative way it's done for other nodes, for which we verify whether they have a paintable before doing painting-related operations with it. Fixes crash on https://www.haiku-os.org/.
This commit is contained in:
parent
670bbf24e5
commit
34cd7f4c22
3 changed files with 22 additions and 2 deletions
|
@ -34,8 +34,9 @@ static void collect_cell_boxes(Vector<PaintableBox const*>& cell_boxes, Layout::
|
|||
{
|
||||
box.for_each_child([&](auto& child) {
|
||||
if (child.display().is_table_cell()) {
|
||||
VERIFY(is<Layout::Box>(child) && child.paintable());
|
||||
cell_boxes.append(static_cast<Layout::Box const&>(child).paintable_box());
|
||||
VERIFY(is<Layout::Box>(child));
|
||||
if (child.paintable())
|
||||
cell_boxes.append(static_cast<Layout::Box const&>(child).paintable_box());
|
||||
} else {
|
||||
collect_cell_boxes(cell_boxes, child);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue