1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 21:47:46 +00:00

LibWeb: Always include floats when computing height:auto for blocks

I'm not sure why we had two modes for this, but floats should always be
included in the auto height AFAICT.
This commit is contained in:
Andreas Kling 2022-03-01 18:51:25 +01:00
parent 6478b460fb
commit 56df05ae44
3 changed files with 18 additions and 24 deletions

View file

@ -310,7 +310,7 @@ float BlockFormattingContext::compute_theoretical_height(FormattingState const&
if (!box.computed_values().height().has_value()
|| (box.computed_values().height()->is_length() && box.computed_values().height()->length().is_auto())
|| (computed_values.height().has_value() && computed_values.height()->is_percentage() && !is_absolute(containing_block.computed_values().height()))) {
height = compute_auto_height_for_block_level_element(state, box, ConsiderFloats::No);
height = compute_auto_height_for_block_level_element(state, box);
} else {
height = computed_values.height().has_value() ? computed_values.height()->resolved(box, containing_block_height).to_px(box) : 0;
}