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

LibWeb: Adjust specified table height

Subtract borders and padding from specified height before comparing to
the used content height.
This commit is contained in:
Andi Gallo 2023-06-25 09:16:34 +00:00 committed by Andreas Kling
parent 77f1e91e9d
commit 3a0f7e8eb8
2 changed files with 5 additions and 6 deletions

View file

@ -590,9 +590,8 @@ void TableFormattingContext::compute_table_height(LayoutMode layout_mode)
// ends up smaller than this number.
CSSPixels height_of_table_containing_block = m_state.get(*table_wrapper().containing_block()).content_height();
auto specified_table_height = table_box().computed_values().height().to_px(table_box(), height_of_table_containing_block);
if (m_table_height < specified_table_height) {
m_table_height = specified_table_height;
}
auto const& table_state = m_state.get(table_box());
m_table_height = max(m_table_height, specified_table_height - table_state.border_box_top() - table_state.border_box_bottom());
}
for (auto& row : m_rows) {