1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:58:12 +00:00

LibHTML: Detect hovering over links

HtmlView now calls Node::enclosing_link_element() to find the nearest
ancestor <a> element.

This patch also adds HTMLElement and HTMLAnchorElement.
This commit is contained in:
Andreas Kling 2019-09-29 11:59:38 +02:00
parent 88de955073
commit b477aff843
9 changed files with 60 additions and 0 deletions

View file

@ -14,6 +14,7 @@ enum class NodeType : unsigned {
};
class Document;
class HTMLAnchorElement;
class ParentNode;
class LayoutNode;
class StyleResolver;
@ -37,6 +38,8 @@ public:
Document& document() { return m_document; }
const Document& document() const { return m_document; }
const HTMLAnchorElement* enclosing_link_element() const;
protected:
Node(Document&, NodeType);