mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-01 15:18:06 +00:00
LibWeb: Optimize hover style invalidation for shadow trees
With this change we skip all :hover selectors that don't belong to a "style scope" (document or shadow root) of old/new hovered node.
This commit is contained in:
parent
9e2eb93cc4
commit
5cac301bb7
Notes:
github-actions[bot]
2025-01-06 11:15:58 +00:00
Author: https://github.com/kalenikaliaksandr
Commit: 5cac301bb7
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3153
2 changed files with 36 additions and 6 deletions
|
@ -174,7 +174,7 @@ public:
|
|||
|
||||
virtual FlyString node_name() const override { return "#document"_fly_string; }
|
||||
|
||||
void invalidate_style_for_elements_affected_by_hover_change(GC::Ptr<Node> old_new_hovered_common_ancestor, GC::Ptr<Node> hovered_node);
|
||||
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*);
|
||||
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