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:
parent
3ad1e7d6b7
commit
a32f3b29a3
1 changed files with 2 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue