mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-23 19:00:59 +00:00
LibWeb: Add namespaces to Universal and TagName selectors
This commit is contained in:
parent
6c2ed0f51b
commit
1858f06881
Notes:
sideshowbarker
2024-07-17 05:09:48 +09:00
Author: https://github.com/AtkinsSJ
Commit: 1858f06881
Pull-request: https://github.com/SerenityOS/serenity/pull/20429
13 changed files with 245 additions and 49 deletions
|
@ -39,7 +39,7 @@ WebIDL::ExceptionOr<JS::GCPtr<Element>> ParentNode::query_selector(StringView se
|
|||
// FIXME: This should be shadow-including. https://drafts.csswg.org/selectors-4/#match-a-selector-against-a-tree
|
||||
for_each_in_subtree_of_type<Element>([&](auto& element) {
|
||||
for (auto& selector : selectors) {
|
||||
if (SelectorEngine::matches(selector, element, {}, this)) {
|
||||
if (SelectorEngine::matches(selector, {}, element, {}, this)) {
|
||||
result = &element;
|
||||
return IterationDecision::Break;
|
||||
}
|
||||
|
@ -71,7 +71,7 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<NodeList>> ParentNode::query_selector_all(S
|
|||
// FIXME: This should be shadow-including. https://drafts.csswg.org/selectors-4/#match-a-selector-against-a-tree
|
||||
for_each_in_subtree_of_type<Element>([&](auto& element) {
|
||||
for (auto& selector : selectors) {
|
||||
if (SelectorEngine::matches(selector, element, {}, this)) {
|
||||
if (SelectorEngine::matches(selector, {}, element, {}, this)) {
|
||||
elements.append(&element);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue