From e4b3591ac4463644d5b77cc8eac4336d4ff0d974 Mon Sep 17 00:00:00 2001 From: Linus Groh Date: Tue, 13 Apr 2021 21:27:35 +0200 Subject: [PATCH] LibWeb: Fix a TODO in the adoption agency algorithm There's still a much bigger one at the end of the function though. :^) --- Userland/Libraries/LibWeb/HTML/Parser/HTMLDocumentParser.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Userland/Libraries/LibWeb/HTML/Parser/HTMLDocumentParser.cpp b/Userland/Libraries/LibWeb/HTML/Parser/HTMLDocumentParser.cpp index f27234d47e..7ee455dab6 100644 --- a/Userland/Libraries/LibWeb/HTML/Parser/HTMLDocumentParser.cpp +++ b/Userland/Libraries/LibWeb/HTML/Parser/HTMLDocumentParser.cpp @@ -976,9 +976,8 @@ HTMLDocumentParser::AdoptionAgencyAlgorithmOutcome HTMLDocumentParser::run_the_a if (!m_stack_of_open_elements.contains(*formatting_element)) { PARSE_ERROR(); - // FIXME: If formatting element is not in the stack of open elements, - // then this is a parse error; remove the element from the list, and return. - TODO(); + m_list_of_active_formatting_elements.remove(*formatting_element); + return AdoptionAgencyAlgorithmOutcome::DoNothing; } if (!m_stack_of_open_elements.has_in_scope(*formatting_element)) {