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

LibWeb: Remove redundant invocation of children changed in HTMLParser

Setting the `data` of a text node already triggers `children changed`
per spec, so there's no need for an explicit call.

This avoids parsing every HTMLStyleElement sheet twice. :^)
This commit is contained in:
Andreas Kling 2023-03-30 09:02:28 +02:00
parent 7319deb03d
commit a925c2dcf2

View file

@ -957,7 +957,6 @@ void HTMLParser::flush_character_insertions()
if (m_character_insertion_builder.is_empty())
return;
m_character_insertion_node->set_data(m_character_insertion_builder.to_deprecated_string());
m_character_insertion_node->parent()->children_changed();
m_character_insertion_builder.clear();
}