LibWeb: Fix typo in StackOfOpenElements::topmost_special_node_below()

Backwards iteration works better if we actually go backwards! :^)
This commit is contained in:
Andreas Kling 2020-05-30 18:49:48 +02:00
parent ca23db10ef
commit 1212485348

View file

@ -122,7 +122,7 @@ void StackOfOpenElements::pop_until_an_element_with_tag_name_has_been_popped(con
Element* StackOfOpenElements::topmost_special_node_below(const Element& formatting_element)
{
Element* found_element = nullptr;
for (ssize_t i = m_elements.size() - 1; i >= 0; ++i) {
for (ssize_t i = m_elements.size() - 1; i >= 0; --i) {
auto& element = m_elements[i];
if (&element == &formatting_element)
break;