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
Notes: github-actions[bot] 2025-02-20 13:33:31 +00:00
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;