1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 03:57:44 +00:00

LibWeb: Ignore svg elements outside of <svg> when building layout tree

An svg layout element without a `SVGSVGElement` ancestor caused a failed
assertion before, because the svg context does not exist when `paint()`
is called
This commit is contained in:
K-Adam 2021-08-05 10:26:09 +02:00 committed by Andreas Kling
parent 758d816b23
commit e8d10fb429
5 changed files with 28 additions and 5 deletions

View file

@ -69,6 +69,9 @@ public:
bool is_parent_node() const { return is_element() || is_document() || is_document_fragment(); }
bool is_slottable() const { return is_element() || is_text(); }
virtual bool requires_svg_container() const { return false; }
virtual bool is_svg_container() const { return false; }
// NOTE: This is intended for the JS bindings.
u16 node_type() const { return (u16)m_type; }