LibWeb: Check for Svg & MathML tags in stack of open elements scope

list & button scope need to check svg & mathml elements besides the list
from s_base_list see
https://html.spec.whatwg.org/multipage/parsing.html#has-an-element-in-the-specific-scope
This commit is contained in:
Lorenz A 2025-09-04 02:59:03 +02:00 committed by Sam Atkins
parent 125b13a0cb
commit e6831003c6
Notes: github-actions[bot] 2025-10-10 11:10:30 +00:00
4 changed files with 28 additions and 15 deletions

View file

@ -63,7 +63,12 @@ public:
void visit_edges(JS::Cell::Visitor&);
private:
bool has_in_scope_impl(FlyString const& tag_name, Vector<FlyString> const&) const;
enum class CheckMathAndSVG : u8 {
No,
Yes,
};
bool has_in_scope_impl(FlyString const& tag_name, Vector<FlyString> const&, CheckMathAndSVG) const;
bool has_in_scope_impl(DOM::Element const& target_node, Vector<FlyString> const&) const;
Vector<GC::Ref<DOM::Element>> m_elements;