diff --git a/Userland/Libraries/LibWeb/DOM/ParentNode.cpp b/Userland/Libraries/LibWeb/DOM/ParentNode.cpp index e924c5320f..eee4fc3100 100644 --- a/Userland/Libraries/LibWeb/DOM/ParentNode.cpp +++ b/Userland/Libraries/LibWeb/DOM/ParentNode.cpp @@ -23,7 +23,8 @@ ExceptionOr> ParentNode::query_selector(StringView selector_text auto selectors = maybe_selectors.value(); RefPtr result; - for_each_in_inclusive_subtree_of_type([&](auto& element) { + // FIXME: This should be shadow-including. https://drafts.csswg.org/selectors-4/#match-a-selector-against-a-tree + for_each_in_subtree_of_type([&](auto& element) { for (auto& selector : selectors) { if (SelectorEngine::matches(selector, element)) { result = element; @@ -45,7 +46,8 @@ ExceptionOr> ParentNode::query_selector_all(StringView s auto selectors = maybe_selectors.value(); NonnullRefPtrVector elements; - for_each_in_inclusive_subtree_of_type([&](auto& element) { + // FIXME: This should be shadow-including. https://drafts.csswg.org/selectors-4/#match-a-selector-against-a-tree + for_each_in_subtree_of_type([&](auto& element) { for (auto& selector : selectors) { if (SelectorEngine::matches(selector, element)) { elements.append(element);