1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:57:35 +00:00

LibHTML: Have Document track its hovered Node

This gets set from HtmlView::mousemove_event() at the moment.
This commit is contained in:
Andreas Kling 2019-09-29 11:50:35 +02:00
parent 754e6e0f67
commit 88de955073
3 changed files with 18 additions and 1 deletions

View file

@ -25,7 +25,12 @@ public:
virtual String tag_name() const override { return "#document"; }
void set_hovered_node(Node* node) { m_hovered_node = node; }
Node* hovered_node() { return m_hovered_node; }
const Node* hovered_node() const { return m_hovered_node; }
private:
OwnPtr<StyleResolver> m_style_resolver;
NonnullRefPtrVector<StyleSheet> m_sheets;
RefPtr<Node> m_hovered_node;
};