mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-11 02:29:21 +00:00
LibWeb: Do not resolve inline block height early if height is definite
This condition was included to implement flex containers with auto height, but it actually can reset the definitive height to 0 for inline blocks with only replaced elements such as an SVG. Removing the condition does not break any in-tree test, so let's improve the situation on the SVG side of things for now.
This commit is contained in:
parent
b6e28ff807
commit
352a66390f
Notes:
github-actions[bot]
2024-10-25 13:14:23 +00:00
Author: https://github.com/gmta
Commit: 352a66390f
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1942
3 changed files with 38 additions and 1 deletions
|
@ -180,7 +180,7 @@ void InlineFormattingContext::dimension_box_on_line(Box const& box, LayoutMode l
|
|||
parent().resolve_used_height_if_not_treated_as_auto(box, AvailableSpace(AvailableSize::make_definite(width), AvailableSize::make_indefinite()));
|
||||
|
||||
// NOTE: Flex containers with `auto` height are treated as `max-content`, so we can compute their height early.
|
||||
if (box_state.has_definite_height() || box.display().is_flex_inside())
|
||||
if (box.display().is_flex_inside())
|
||||
parent().resolve_used_height_if_treated_as_auto(box, AvailableSpace(AvailableSize::make_definite(width), AvailableSize::make_indefinite()));
|
||||
|
||||
auto independent_formatting_context = layout_inside(box, layout_mode, box_state.available_inner_space_or_constraints_from(*m_available_space));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue