mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-02 16:33:13 +00:00
LibWeb: Add a StackOfOpenElements helper for "popping until a tag name"
This commit is contained in:
parent
e026a50777
commit
c84212aaba
Notes:
sideshowbarker
2024-07-19 06:01:54 +09:00
Author: https://github.com/awesomekling
Commit: c84212aaba
3 changed files with 14 additions and 12 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue