mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 08:36:15 +00:00
LibWeb: Add a StackOfOpenElements helper for "popping until a tag name"
This commit is contained in:
@@ -94,4 +94,11 @@ bool StackOfOpenElements::contains(const Element& element) const
|
||||
return false;
|
||||
}
|
||||
|
||||
void StackOfOpenElements::pop_until_an_element_with_tag_name_has_been_popped(const FlyString& tag_name)
|
||||
{
|
||||
while (m_elements.last().tag_name() != tag_name)
|
||||
pop();
|
||||
pop();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user