summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Wanner <skyrising@pvpctutorials.de>2022-04-08 18:18:09 +0200
committerAndreas Kling <kling@serenityos.org>2022-04-08 20:44:23 +0200
commita57bfc2f8c436b35f4a9e3083d5dcdff8cd269b1 (patch)
tree3c774f1fba9d28c903f589b2a4767e5742702a97
parent62185452f0b763227520a8fe50cc8687b755efeb (diff)
downloadserenity-a57bfc2f8c436b35f4a9e3083d5dcdff8cd269b1.zip
LibWeb: Take already computed height for flex container's auto height
Similar to BlockFormattingContext, FlexFormatting context already handles height:auto sizing correctly and sets the content_height correspondingly.
-rw-r--r--Userland/Libraries/LibWeb/Layout/FormattingContext.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/Layout/FormattingContext.cpp b/Userland/Libraries/LibWeb/Layout/FormattingContext.cpp
index 007da2946d..a63bfdbb4c 100644
--- a/Userland/Libraries/LibWeb/Layout/FormattingContext.cpp
+++ b/Userland/Libraries/LibWeb/Layout/FormattingContext.cpp
@@ -204,6 +204,10 @@ float FormattingContext::compute_auto_height_for_block_level_element(FormattingS
auto const& box_state = state.get(box);
+ auto display = box.computed_values().display();
+ if (display.is_flex_inside())
+ return box_state.content_height;
+
// https://www.w3.org/TR/CSS22/visudet.html#normal-block
// 10.6.3 Block-level non-replaced elements in normal flow when 'overflow' computes to 'visible'