mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 15:45:25 +00:00
LibWeb: Use IterationDecision in single level Node iteration methods
`Node::for_each_child()` and `Node::for_each_child_of_type()` callbacks now return an `IterationDecision`, which allows us to break early if required.
This commit is contained in:
committed by
Andrew Kaster
parent
b5bed37074
commit
c57d395a48
@@ -1215,6 +1215,7 @@ CSSPixels BlockFormattingContext::greatest_child_width(Box const& box) const
|
||||
box.for_each_child_of_type<Box>([&](Box const& child) {
|
||||
if (!child.is_absolutely_positioned())
|
||||
max_width = max(max_width, m_state.get(child).margin_box_width());
|
||||
return IterationDecision::Continue;
|
||||
});
|
||||
}
|
||||
return max_width;
|
||||
|
||||
Reference in New Issue
Block a user