From b85ab86c84946b9141324cf43ebf61129ed3f29d Mon Sep 17 00:00:00 2001 From: Kevin Meyer Date: Tue, 26 May 2020 21:39:28 +0200 Subject: [PATCH] LibWeb: Fix step within reconstruct the active elements In step 4 of the "renstruct the active formatting elements" algorithm it says: Rewind: If there are no entries before entry in the list of active formatting elements, then jump to the step labeled create. Prior to this patch, the implementation accorded to the spec only for the first loop iteration. --- Libraries/LibWeb/Parser/HTMLDocumentParser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/LibWeb/Parser/HTMLDocumentParser.cpp b/Libraries/LibWeb/Parser/HTMLDocumentParser.cpp index cd4a40c5dd..2b84bbfa05 100644 --- a/Libraries/LibWeb/Parser/HTMLDocumentParser.cpp +++ b/Libraries/LibWeb/Parser/HTMLDocumentParser.cpp @@ -430,7 +430,7 @@ void HTMLDocumentParser::reconstruct_the_active_formatting_elements() RefPtr entry = m_list_of_active_formatting_elements.at(index); Rewind: - if (m_list_of_active_formatting_elements.size() == 1) { + if (index == 0) { goto Create; }