LibXML: Notify the listener about the root node as well

We previously did not notify the listener about entering the root node,
which caused the following snippet to produce the wrong output:
    a = new DOMParser
    a.parseFromString("<x/>", "text/xml").documentElement // != null
This commit is contained in:
Ali Mohammad Pur 2023-05-05 02:09:14 +03:30 committed by Jelle Raaijmakers
parent 0ab19dc4cd
commit 87e95ceb69
Notes: sideshowbarker 2024-07-18 02:13:10 +09:00

View File

@ -74,7 +74,7 @@ void Parser::append_node(NonnullOwnPtr<Node> node)
m_entered_node->content.get<Node::Element>().children.append(move(node));
} else {
m_root_node = move(node);
m_entered_node = m_root_node.ptr();
enter_node(*m_root_node);
}
}