1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-16 07:04:58 +00:00

LibWeb: Support parsing "select" elements (outside of tables)

This commit is contained in:
Andreas Kling 2020-05-30 19:58:52 +02:00
parent 60352c7b9b
commit ca6fbefbc9
4 changed files with 173 additions and 2 deletions

View file

@ -94,6 +94,14 @@ bool StackOfOpenElements::has_in_list_item_scope(const FlyString& tag_name) cons
return has_in_scope_impl(tag_name, list);
}
bool StackOfOpenElements::has_in_select_scope(const FlyString& tag_name) const
{
auto list = s_base_list;
list.append("option");
list.append("optgroup");
return has_in_scope_impl(tag_name, list);
}
bool StackOfOpenElements::contains(const Element& element) const
{
for (auto& element_on_stack : m_elements) {