1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:17:45 +00:00

LibWeb: Remove FFC hack where we assign flex item box dimensions twice

This was necessary in the past, because IFC would set the height of its
containing block after inline layout.

Now that IFC can properly communicate the automatic size to its parent
formatting context, this hack is no longer necessary.
This commit is contained in:
Andreas Kling 2023-03-08 23:10:18 +01:00
parent 4bfdc4db17
commit 8929c7b474

View file

@ -221,12 +221,6 @@ void FlexFormattingContext::run(Box const& run_box, LayoutMode, AvailableSpace c
independent_formatting_context->parent_context_did_dimension_child_root_box();
}
// FIXME: We run the "copy dimensions" step *again* here, in order to override any sizes
// assigned to the flex item by the "layout inside" step above. This is definitely not
// part of the spec, and simply covering up the fact that our inside layout currently
// mutates the height of BFC roots.
copy_dimensions_from_flex_items_to_boxes();
if (available_width.is_intrinsic_sizing_constraint() || available_height.is_intrinsic_sizing_constraint()) {
// We're computing intrinsic size for the flex container.
determine_intrinsic_size_of_flex_container();