1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 18:38:10 +00:00

LibWeb: Return CSSPixels from calculate_inner_height()

Similar to calculate_inner_width(), let's make the caller responsible
for handling "auto" instead of returning the input height as is when
when it cannot be resolved.
This commit is contained in:
Aliaksandr Kalenik 2024-01-07 05:46:36 +01:00 committed by Andreas Kling
parent 05a1dbeb91
commit 39abd9095e
6 changed files with 22 additions and 20 deletions

View file

@ -34,7 +34,7 @@ CSSPixels FlexFormattingContext::get_pixel_width(Box const& box, CSS::Size const
CSSPixels FlexFormattingContext::get_pixel_height(Box const& box, CSS::Size const& size) const
{
return calculate_inner_height(box, containing_block_height_as_available_size(box), size).to_px(box);
return calculate_inner_height(box, containing_block_height_as_available_size(box), size);
}
FlexFormattingContext::FlexFormattingContext(LayoutState& state, Box const& flex_container, FormattingContext* parent)