diff options
author | Aliaksandr Kalenik <kalenik.aliaksandr@gmail.com> | 2023-05-15 16:55:56 +0300 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2023-05-15 16:20:51 +0200 |
commit | 1ecbbadf3a25cff8d240f096bd1e4b57f02ca229 (patch) | |
tree | e751a5154aec8d765a4800f77ecd3237e93d8d03 /Userland | |
parent | daf86eaabc6d95f304067cd5e66ae961ad31f496 (diff) | |
download | serenity-1ecbbadf3a25cff8d240f096bd1e4b57f02ca229.zip |
LibWeb: Fix specified_size_suggestion to use size of dimension
specified_size_suggestion() should use width or height depending on
specified dimension.
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/Libraries/LibWeb/Layout/GridFormattingContext.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/Layout/GridFormattingContext.cpp b/Userland/Libraries/LibWeb/Layout/GridFormattingContext.cpp index f7bcf40323..5310c1db6a 100644 --- a/Userland/Libraries/LibWeb/Layout/GridFormattingContext.cpp +++ b/Userland/Libraries/LibWeb/Layout/GridFormattingContext.cpp @@ -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 {}; |