LibWeb: Filter :hover selectors early for elements that aren't hovered

Some websites (like vercel.com...) have a *lot* of :hover selectors that
we can simply skip for any element that isn't currently hovered.
This commit is contained in:
Andreas Kling 2024-09-09 15:37:17 +02:00 committed by Andreas Kling
commit ef4f5ac8fb
Notes: github-actions[bot] 2024-09-09 18:13:06 +00:00
4 changed files with 33 additions and 1 deletions

View file

@ -21,4 +21,6 @@ bool matches(CSS::Selector const&, Optional<CSS::CSSStyleSheet const&> style_she
[[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&);
[[nodiscard]] bool matches_hover_pseudo_class(DOM::Element const&);
}