1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 07:58:11 +00:00

LibWeb: Parse calc() function in grid sizes

Adds missing part of grid size parsing function to handle calc().
This commit is contained in:
Aliaksandr Kalenik 2023-05-10 23:46:33 +03:00 committed by Andreas Kling
parent 7fee05e18c
commit c2f6ba8f5f
4 changed files with 42 additions and 2 deletions

View file

@ -48,6 +48,9 @@ Size GridSize::css_size() const
return CSS::Size::make_auto();
if (m_length_percentage.is_length())
return CSS::Size::make_length(m_length_percentage.length());
if (m_length_percentage.is_calculated()) {
return CSS::Size::make_calculated(m_length_percentage.calculated());
}
return CSS::Size::make_percentage(m_length_percentage.percentage());
}