diff options
author | Andreas Kling <kling@serenityos.org> | 2022-07-10 23:54:06 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-07-11 18:57:45 +0200 |
commit | e1dab7b63d2e3168bf9940f736046c5ddf4eac38 (patch) | |
tree | a8009aa1c725d6821dbdd3e1d25583bc3a66d4ca | |
parent | aee3d79ad1853179ed35738a164ffa1f8ba47e6a (diff) | |
download | serenity-e1dab7b63d2e3168bf9940f736046c5ddf4eac38.zip |
LibWeb: Use the *outer* flex base size in intrinsic size calculation
-rw-r--r-- | Userland/Libraries/LibWeb/Layout/FlexFormattingContext.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/Layout/FlexFormattingContext.cpp b/Userland/Libraries/LibWeb/Layout/FlexFormattingContext.cpp index e67dc0dd71..9fc2481dc9 100644 --- a/Userland/Libraries/LibWeb/Layout/FlexFormattingContext.cpp +++ b/Userland/Libraries/LibWeb/Layout/FlexFormattingContext.cpp @@ -1351,7 +1351,7 @@ float FlexFormattingContext::calculate_intrinsic_main_size_of_flex_container(Lay else contribution = calculate_main_max_content_contribution(flex_item); - float flex_fraction = contribution - flex_item.flex_base_size; + float flex_fraction = contribution - (flex_item.flex_base_size + flex_item.margins.main_before + flex_item.margins.main_after + flex_item.borders.main_before + flex_item.borders.main_after + flex_item.padding.main_before + flex_item.padding.main_after); if (flex_fraction >= 0) flex_fraction /= max(flex_item.box.computed_values().flex_grow(), 1.0f); else |