mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 03:37:43 +00:00
LibWeb: Return max margin box width from greatest_child_width
Return max margin box width instead of max border box width from greatest_child_width. This change fixes: https://wpt.live/css/CSS2/margin-padding-clear/margin-008.xht
This commit is contained in:
parent
16f2904443
commit
428db6e766
2 changed files with 2 additions and 2 deletions
|
@ -768,7 +768,7 @@ float BlockFormattingContext::greatest_child_width(Box const& box)
|
||||||
} else {
|
} else {
|
||||||
box.for_each_child_of_type<Box>([&](Box const& child) {
|
box.for_each_child_of_type<Box>([&](Box const& child) {
|
||||||
if (!child.is_absolutely_positioned())
|
if (!child.is_absolutely_positioned())
|
||||||
max_width = max(max_width, m_state.get(child).border_box_width());
|
max_width = max(max_width, m_state.get(child).margin_box_width());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return max_width;
|
return max_width;
|
||||||
|
|
|
@ -207,7 +207,7 @@ float FormattingContext::greatest_child_width(Box const& box)
|
||||||
} else {
|
} else {
|
||||||
box.for_each_child_of_type<Box>([&](Box const& child) {
|
box.for_each_child_of_type<Box>([&](Box const& child) {
|
||||||
if (!child.is_absolutely_positioned())
|
if (!child.is_absolutely_positioned())
|
||||||
max_width = max(max_width, m_state.get(child).border_box_width());
|
max_width = max(max_width, m_state.get(child).margin_box_width());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return max_width;
|
return max_width;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue