mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-29 05:38:24 +00:00
LibWeb: Make :has() actually work for non-descendant relative selectors
The traversal for these was incorrect and awkward. Now it's less incorrect but still very awkward. We should find better ways to implement this, but for now this at least passes many more WPT tests.
This commit is contained in:
parent
f24b91b01e
commit
9e080e197c
Notes:
github-actions[bot]
2024-10-27 12:34:50 +00:00
Author: https://github.com/awesomekling
Commit: 9e080e197c
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1997
2 changed files with 49 additions and 23 deletions
|
@ -16,7 +16,7 @@ enum class SelectorKind {
|
|||
Relative,
|
||||
};
|
||||
|
||||
bool matches(CSS::Selector const&, Optional<CSS::CSSStyleSheet const&> style_sheet_for_rule, DOM::Element const&, JS::GCPtr<DOM::Element const> shadow_host, Optional<CSS::Selector::PseudoElement::Type> = {}, JS::GCPtr<DOM::ParentNode const> scope = {}, SelectorKind selector_kind = SelectorKind::Normal);
|
||||
bool matches(CSS::Selector const&, Optional<CSS::CSSStyleSheet const&> style_sheet_for_rule, DOM::Element const&, JS::GCPtr<DOM::Element const> shadow_host, Optional<CSS::Selector::PseudoElement::Type> = {}, JS::GCPtr<DOM::ParentNode const> scope = {}, SelectorKind selector_kind = SelectorKind::Normal, JS::GCPtr<DOM::Element const> anchor = nullptr);
|
||||
|
||||
[[nodiscard]] bool fast_matches(CSS::Selector const&, Optional<CSS::CSSStyleSheet const&> style_sheet_for_rule, DOM::Element const&, JS::GCPtr<DOM::Element const> shadow_host);
|
||||
[[nodiscard]] bool can_use_fast_matches(CSS::Selector const&);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue