1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:07:44 +00:00

LibWeb: Report border box width for tables in a block

For the containing block, table borders are opaque and have to be
accounted when computing the table width since they use available space.
This commit is contained in:
Andi Gallo 2023-06-25 03:50:41 +00:00 committed by Andreas Kling
parent 2c4908094c
commit 8b34af816e
19 changed files with 154 additions and 26 deletions

View file

@ -437,7 +437,7 @@ CSSPixels BlockFormattingContext::compute_table_box_width_inside_table_wrapper(B
});
VERIFY(table_box.has_value());
auto table_used_width = throwaway_state.get(*table_box).content_width();
auto table_used_width = throwaway_state.get(*table_box).border_box_width();
return available_space.width.is_definite() ? min(table_used_width, available_width) : table_used_width;
}