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

LibWeb: Return CSSPixels from calculate_inner_width()

Initially, this function was made to return CSS::Length because some of
its callers were expecting it to ignore "auto" width on input and
return it as is. Instead, let's just forbid using "auto" for input
width and always return CSSPixels.
This commit is contained in:
Aliaksandr Kalenik 2024-01-07 05:24:09 +01:00 committed by Andreas Kling
parent 4bc38300ad
commit 05a1dbeb91
6 changed files with 48 additions and 40 deletions

View file

@ -29,7 +29,7 @@ template<typename T>
CSSPixels FlexFormattingContext::get_pixel_width(Box const& box, CSS::Size const& size) const
{
return calculate_inner_width(box, containing_block_width_as_available_size(box), size).to_px(box);
return calculate_inner_width(box, containing_block_width_as_available_size(box), size);
}
CSSPixels FlexFormattingContext::get_pixel_height(Box const& box, CSS::Size const& size) const