mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-02 04:27:12 +02: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:
Notes:
sideshowbarker
2024-07-19 05:28:27 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/1c2b6b074e9
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user