mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:38:11 +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:
parent
f482628fe5
commit
ca71ac484b
12 changed files with 29 additions and 29 deletions
|
@ -40,7 +40,7 @@ RefPtr<Element> ParentNode::query_selector(const StringView& selector_text)
|
|||
dump_selector(selector.value());
|
||||
|
||||
RefPtr<Element> result;
|
||||
for_each_in_subtree_of_type<Element>([&](auto& element) {
|
||||
for_each_in_inclusive_subtree_of_type<Element>([&](auto& element) {
|
||||
if (SelectorEngine::matches(selector.value(), element)) {
|
||||
result = element;
|
||||
return IterationDecision::Break;
|
||||
|
@ -60,7 +60,7 @@ NonnullRefPtrVector<Element> ParentNode::query_selector_all(const StringView& se
|
|||
dump_selector(selector.value());
|
||||
|
||||
NonnullRefPtrVector<Element> elements;
|
||||
for_each_in_subtree_of_type<Element>([&](auto& element) {
|
||||
for_each_in_inclusive_subtree_of_type<Element>([&](auto& element) {
|
||||
if (SelectorEngine::matches(selector.value(), element)) {
|
||||
elements.append(element);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue