1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 15:48:12 +00:00

LibWeb: Fix specified_size_suggestion to use size of dimension

specified_size_suggestion() should use width or height depending on
specified dimension.
This commit is contained in:
Aliaksandr Kalenik 2023-05-15 16:55:56 +03:00 committed by Andreas Kling
parent daf86eaabc
commit 1ecbbadf3a

View file

@ -1702,7 +1702,7 @@ Optional<CSSPixels> GridFormattingContext::specified_size_suggestion(GridItem co
if (has_definite_preferred_size) {
// FIXME: consider margins, padding and borders because it is outer size.
auto containing_block_size = containing_block_size_for_item(item, dimension);
return item.box().computed_values().width().to_px(item.box(), containing_block_size);
return get_item_preferred_size(item, dimension).to_px(item.box(), containing_block_size);
}
return {};