diff options
author | K-Adam <kecskes.adam@outlook.com> | 2021-08-05 10:26:09 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-08-05 20:17:08 +0200 |
commit | e8d10fb42933f548add3076cb1beaa4dc201d9d4 (patch) | |
tree | fa1137da810b07c8f606957e5b4c14207d2c58fd /Userland/Libraries/LibWeb/DOM/Node.h | |
parent | 758d816b23e86cbe9f24471988e73f3c15f8c080 (diff) | |
download | serenity-e8d10fb42933f548add3076cb1beaa4dc201d9d4.zip |
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
Diffstat (limited to 'Userland/Libraries/LibWeb/DOM/Node.h')
-rw-r--r-- | Userland/Libraries/LibWeb/DOM/Node.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/DOM/Node.h b/Userland/Libraries/LibWeb/DOM/Node.h index 6d8614a717..2238fcedf6 100644 --- a/Userland/Libraries/LibWeb/DOM/Node.h +++ b/Userland/Libraries/LibWeb/DOM/Node.h @@ -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; } |