mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-01 20:17:13 +02: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:
Notes:
sideshowbarker
2024-07-17 07:25:39 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/a925c2dcf2 Pull-request: https://github.com/SerenityOS/serenity/pull/18098 Reviewed-by: https://github.com/AtkinsSJ ✅
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user