1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 14:57:35 +00:00

LibWeb: Rename "for_each_in_subtree(_of_type)" to "for_each_in_inclusive_subtree(_of_type)"

This is because it includes the initial node that the function was
called on, which makes it "inclusive" as according to the spec.

This is important as there are non-inclusive variants, particularly
used in the node mutation algorithms.
This commit is contained in:
Luke 2021-04-06 18:38:10 +01:00 committed by Andreas Kling
parent f482628fe5
commit ca71ac484b
12 changed files with 29 additions and 29 deletions

View file

@ -155,7 +155,7 @@ RefPtr<Node> TreeBuilder::build(DOM::Node& dom_node)
template<CSS::Display display, typename Callback>
void TreeBuilder::for_each_in_tree_with_display(NodeWithStyle& root, Callback callback)
{
root.for_each_in_subtree_of_type<Box>([&](auto& box) {
root.for_each_in_inclusive_subtree_of_type<Box>([&](auto& box) {
if (box.computed_values().display() == display)
callback(box);
return IterationDecision::Continue;