mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:28:12 +00:00
LibWeb: Fix inline-block percentage height calculation
If an inline-block has a percentage height that relies on the auto height of the containing block, it should always resolve to the automatic height of the box, regardless of the percentage value. This change may seem confusing, but it aligns with the behavior of other engines.
This commit is contained in:
parent
4e911cb40e
commit
07f451044b
3 changed files with 24 additions and 1 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue