From a925c2dcf213ba1901c7812814777488caea8686 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Thu, 30 Mar 2023 09:02:28 +0200 Subject: [PATCH] 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. :^) --- Userland/Libraries/LibWeb/HTML/Parser/HTMLParser.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/Userland/Libraries/LibWeb/HTML/Parser/HTMLParser.cpp b/Userland/Libraries/LibWeb/HTML/Parser/HTMLParser.cpp index c0877cc9af..ae94d43a08 100644 --- a/Userland/Libraries/LibWeb/HTML/Parser/HTMLParser.cpp +++ b/Userland/Libraries/LibWeb/HTML/Parser/HTMLParser.cpp @@ -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(); }