LibWeb: Treat min{max}-height as none if available is intrinsic [GFC]

Fixes infinite recursion in following cases:
- max-height: fit-content
- max-height: min-content
- max-height: max-content
This commit is contained in:
Aliaksandr Kalenik 2024-12-03 20:09:23 +01:00 committed by Andreas Kling
commit bfdf52701f
Notes: github-actions[bot] 2024-12-03 22:10:55 +00:00
3 changed files with 25 additions and 0 deletions

View file

@ -1965,6 +1965,12 @@ bool FormattingContext::should_treat_max_height_as_none(Box const& box, Availabl
if (!m_state.get(*box.non_anonymous_containing_block()).has_definite_height())
return true;
}
if (max_height.is_fit_content() && available_height.is_intrinsic_sizing_constraint())
return true;
if (max_height.is_max_content() && available_height.is_max_content())
return true;
if (max_height.is_min_content() && available_height.is_min_content())
return true;
return false;
}