1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-20 18:15:07 +00:00

LibWeb: Detach any LayoutNode from its parent if present in ~Node()

This commit is contained in:
Andreas Kling 2020-03-25 18:48:32 +01:00
parent 3ad1e7d6b7
commit a32f3b29a3

View file

@ -55,6 +55,8 @@ Node::Node(Document& document, NodeType type)
Node::~Node()
{
if (layout_node() && layout_node()->parent())
layout_node()->parent()->remove_child(*layout_node());
}
const HTMLAnchorElement* Node::enclosing_link_element() const