diff --git a/Tests/LibWeb/Layout/expected/block-and-inline/inline-block-with-percentage-height-and-auto-height-of-containing-block.txt b/Tests/LibWeb/Layout/expected/block-and-inline/inline-block-with-percentage-height-and-auto-height-of-containing-block.txt new file mode 100644 index 0000000000..5b707412a2 --- /dev/null +++ b/Tests/LibWeb/Layout/expected/block-and-inline/inline-block-with-percentage-height-and-auto-height-of-containing-block.txt @@ -0,0 +1,11 @@ +Viewport <#document> at (0,0) content-size 800x600 children: not-inline + BlockContainer at (0,0) content-size 800x33.46875 [BFC] children: not-inline + BlockContainer at (8,8) content-size 784x17.46875 children: not-inline + BlockContainer at (8,8) content-size 784x17.46875 children: inline + line 0 width: 36.453125, height: 17.46875, bottom: 17.46875, baseline: 13.53125 + frag 0 from BlockContainer start: 0, length: 0, rect: [8,8 36.453125x17.46875] + BlockContainer at (8,8) content-size 36.453125x17.46875 inline-block [BFC] children: inline + line 0 width: 36.453125, height: 17.46875, bottom: 17.46875, baseline: 13.53125 + frag 0 from TextNode start: 0, length: 4, rect: [8,8 36.453125x17.46875] + "docs" + TextNode <#text> diff --git a/Tests/LibWeb/Layout/input/block-and-inline/inline-block-with-percentage-height-and-auto-height-of-containing-block.html b/Tests/LibWeb/Layout/input/block-and-inline/inline-block-with-percentage-height-and-auto-height-of-containing-block.html new file mode 100644 index 0000000000..5eca8286e9 --- /dev/null +++ b/Tests/LibWeb/Layout/input/block-and-inline/inline-block-with-percentage-height-and-auto-height-of-containing-block.html @@ -0,0 +1,12 @@ + + +
docs
\ No newline at end of file diff --git a/Userland/Libraries/LibWeb/Layout/InlineFormattingContext.cpp b/Userland/Libraries/LibWeb/Layout/InlineFormattingContext.cpp index 623464db01..eee784a4f7 100644 --- a/Userland/Libraries/LibWeb/Layout/InlineFormattingContext.cpp +++ b/Userland/Libraries/LibWeb/Layout/InlineFormattingContext.cpp @@ -165,7 +165,7 @@ void InlineFormattingContext::dimension_box_on_line(Box const& box, LayoutMode l auto independent_formatting_context = layout_inside(box, layout_mode, box_state.available_inner_space_or_constraints_from(*m_available_space)); auto const& height_value = box.computed_values().height(); - if (height_value.is_auto()) { + if (should_treat_height_as_auto(box, *m_available_space)) { // FIXME: (10.6.6) If 'height' is 'auto', the height depends on the element's descendants per 10.6.7. parent().compute_height(box, AvailableSpace(AvailableSize::make_indefinite(), AvailableSize::make_indefinite())); } else {