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

LibWeb: Improve auto height calculation for tables

Change `compute_auto_height_for_block_level_element` to use max height
(`m_automatic_content_height` produced from TFC) for tables with auto
height which is more correct behaviour than treating them like block
containers.
This commit is contained in:
Aliaksandr Kalenik 2023-01-20 00:59:43 +01:00 committed by Andreas Kling
parent addfa4ed58
commit 87f0e835eb
3 changed files with 8 additions and 3 deletions

View file

@ -404,6 +404,9 @@ CSSPixels BlockFormattingContext::compute_auto_height_for_block_level_element(Bo
// max-content size.
return calculate_max_content_height(box, available_space.width);
}
if (display.is_table_inside()) {
return calculate_max_content_height(box, available_space.height);
}
// https://www.w3.org/TR/CSS22/visudet.html#normal-block
// 10.6.3 Block-level non-replaced elements in normal flow when 'overflow' computes to 'visible'