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

LibWeb: Use available space to resolve table container width

Using avilable space directly while resolving table container width
allows to avoid assigning it to table wrapper box content width which
sometimes involves infinite (saturated) values.

Also this allows to get rid of set_max_content_width() which is a hack
that allows to bypass set_content_width() to assign infinite
(saturated) width to a box.

Closes https://github.com/SerenityOS/serenity/issues/19521
This commit is contained in:
Aliaksandr Kalenik 2023-08-11 18:02:23 +02:00 committed by Andreas Kling
parent fb60db7b00
commit 9101c8d079
7 changed files with 42 additions and 35 deletions

View file

@ -426,18 +426,4 @@ void LayoutState::UsedValues::set_indefinite_content_height()
m_has_definite_height = false;
}
void LayoutState::UsedValues::set_min_content_width()
{
width_constraint = SizeConstraint::MinContent;
m_content_width = 0;
m_has_definite_height = false;
}
void LayoutState::UsedValues::set_max_content_width()
{
width_constraint = SizeConstraint::MaxContent;
m_content_width = INFINITY;
m_has_definite_width = false;
}
}