mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 21:29:06 +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
Notes:
sideshowbarker
2024-07-17 06:54:15 +09:00
Author: https://github.com/kalenikaliaksandr
Commit: 07f451044b
Pull-request: https://github.com/SerenityOS/serenity/pull/20045
Reviewed-by: https://github.com/awesomekling
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