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.
This commit is contained in:
Kevin Meyer 2020-05-26 21:39:28 +02:00 committed by Andreas Kling
parent 8b3eb4535d
commit b85ab86c84
Notes: sideshowbarker 2024-07-19 06:06:14 +09:00

View file

@ -430,7 +430,7 @@ void HTMLDocumentParser::reconstruct_the_active_formatting_elements()
RefPtr<Element> entry = m_list_of_active_formatting_elements.at(index);
Rewind:
if (m_list_of_active_formatting_elements.size() == 1) {
if (index == 0) {
goto Create;
}