LibWeb: Preserve attributes in "reconstruct active formatting elements"

25 new passes in WPT/html/syntax/parsing/ :^)
This commit is contained in:
Andreas Kling
2025-02-19 15:13:06 +01:00
committed by Andreas Kling
parent 7549f6842f
commit 0c0fe09e70
15 changed files with 49 additions and 47 deletions

View File

@@ -1457,6 +1457,9 @@ Create:
// FIXME: Hold on to the real token!
auto new_element = insert_html_element(HTMLToken::make_start_tag(entry->element->local_name()));
entry->element->for_each_attribute([&](auto& name, auto& value) {
new_element->append_attribute(name, value);
});
// 9. Replace the entry for entry in the list with an entry for new element.
m_list_of_active_formatting_elements.entries().at(index).element = new_element;