mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 05:18:12 +00:00
LibWeb: Fix misunderstood implementation of "table" and "select" scopes
These "stack of open elements" scopes are not supposed to include the base list of element types.
This commit is contained in:
parent
966bc05fef
commit
1c2b6b074e
1 changed files with 2 additions and 9 deletions
|
@ -79,11 +79,7 @@ bool StackOfOpenElements::has_in_button_scope(const FlyString& tag_name) const
|
|||
|
||||
bool StackOfOpenElements::has_in_table_scope(const FlyString& tag_name) const
|
||||
{
|
||||
auto list = s_base_list;
|
||||
list.append("html");
|
||||
list.append("table");
|
||||
list.append("template");
|
||||
return has_in_scope_impl(tag_name, list);
|
||||
return has_in_scope_impl(tag_name, { "html", "table", "template" });
|
||||
}
|
||||
|
||||
bool StackOfOpenElements::has_in_list_item_scope(const FlyString& tag_name) const
|
||||
|
@ -96,10 +92,7 @@ bool StackOfOpenElements::has_in_list_item_scope(const FlyString& tag_name) cons
|
|||
|
||||
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);
|
||||
return has_in_scope_impl(tag_name, { "option", "optgroup" });
|
||||
}
|
||||
|
||||
bool StackOfOpenElements::contains(const Element& element) const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue