mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 20:29:18 +00:00
LibWeb: Make :hover invalidation logic reusable for all pseudo classes
We achieve this by keeping track of all checked pseudo class selectors in the SelectorEngine code. We also give StyleComputer per-pseudo-class rule caches.
This commit is contained in:
parent
ed35f9e7c2
commit
e1777f6e79
Notes:
github-actions[bot]
2025-04-17 17:47:22 +00:00
Author: https://github.com/awesomekling
Commit: e1777f6e79
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4388
13 changed files with 134 additions and 59 deletions
|
@ -253,8 +253,9 @@ public:
|
|||
|
||||
virtual FlyString node_name() const override { return "#document"_fly_string; }
|
||||
|
||||
void invalidate_style_for_elements_affected_by_hover_change(Node& old_new_hovered_common_ancestor, GC::Ptr<Node> hovered_node);
|
||||
void set_hovered_node(Node*);
|
||||
void invalidate_style_for_elements_affected_by_pseudo_class_change(CSS::PseudoClass, auto& element_slot, Node& old_new_common_ancestor, auto node);
|
||||
|
||||
void set_hovered_node(GC::Ptr<Node>);
|
||||
Node* hovered_node() { return m_hovered_node.ptr(); }
|
||||
Node const* hovered_node() const { return m_hovered_node.ptr(); }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue