mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-11 17:00:37 +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
Notes:
sideshowbarker
2024-07-17 04:11:24 +09:00
Author: https://github.com/kalenikaliaksandr Commit: https://github.com/SerenityOS/serenity/commit/428db6e766 Pull-request: https://github.com/SerenityOS/serenity/pull/16160
2 changed files with 2 additions and 2 deletions
|
@ -768,7 +768,7 @@ float BlockFormattingContext::greatest_child_width(Box const& box)
|
|||
} else {
|
||||
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());
|
||||
max_width = max(max_width, m_state.get(child).margin_box_width());
|
||||
});
|
||||
}
|
||||
return max_width;
|
||||
|
|
|
@ -207,7 +207,7 @@ float FormattingContext::greatest_child_width(Box const& box)
|
|||
} else {
|
||||
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());
|
||||
max_width = max(max_width, m_state.get(child).margin_box_width());
|
||||
});
|
||||
}
|
||||
return max_width;
|
||||
|
|
Loading…
Reference in a new issue