1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 17:28:11 +00:00

LibWeb: Don't include abspos children in containing block's auto width

This commit is contained in:
Andreas Kling 2022-09-13 18:53:11 +02:00
parent df22f38feb
commit fb5879fdcc
2 changed files with 6 additions and 4 deletions

View file

@ -189,8 +189,9 @@ float FormattingContext::greatest_child_width(Box const& box)
max_width = max(max_width, line_box.width());
}
} else {
box.for_each_child_of_type<Box>([&](auto& child) {
max_width = max(max_width, m_state.get(child).border_box_width());
box.for_each_child_of_type<Box>([&](Box const& child) {
if (!child.is_absolutely_positioned())
max_width = max(max_width, m_state.get(child).border_box_width());
});
}
return max_width;