diff options
author | Simon Danner <danner.simon@gmail.com> | 2022-04-11 16:59:03 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-04-11 20:19:10 +0200 |
commit | bd90498332839618e8755cbf64283f985d5806ee (patch) | |
tree | 7cd3da46aee339d415e7affa3cb93bb4984005d2 /Userland/Libraries/LibWeb/DOM/ElementFactory.cpp | |
parent | 55e91928868bc2a357d4e82aceed7bcb80b21f2c (diff) | |
download | serenity-bd90498332839618e8755cbf64283f985d5806ee.zip |
LibWeb: Add SVGDefsElement
* Similarly to clipPath, this doesn't need to get rendered, so return no
LayoutNode.
Diffstat (limited to 'Userland/Libraries/LibWeb/DOM/ElementFactory.cpp')
-rw-r--r-- | Userland/Libraries/LibWeb/DOM/ElementFactory.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/DOM/ElementFactory.cpp b/Userland/Libraries/LibWeb/DOM/ElementFactory.cpp index 0a5806cec0..e1d7329db7 100644 --- a/Userland/Libraries/LibWeb/DOM/ElementFactory.cpp +++ b/Userland/Libraries/LibWeb/DOM/ElementFactory.cpp @@ -78,6 +78,7 @@ #include <LibWeb/HTML/HTMLVideoElement.h> #include <LibWeb/SVG/SVGCircleElement.h> #include <LibWeb/SVG/SVGClipPathElement.h> +#include <LibWeb/SVG/SVGDefsElement.h> #include <LibWeb/SVG/SVGEllipseElement.h> #include <LibWeb/SVG/SVGGElement.h> #include <LibWeb/SVG/SVGLineElement.h> @@ -266,6 +267,8 @@ NonnullRefPtr<Element> create_element(Document& document, FlyString local_name, return adopt_ref(*new SVG::SVGClipPathElement(document, move(qualified_name))); if (lowercase_tag_name == SVG::TagNames::circle) return adopt_ref(*new SVG::SVGCircleElement(document, move(qualified_name))); + if (lowercase_tag_name.equals_ignoring_case(SVG::TagNames::defs)) + return adopt_ref(*new SVG::SVGDefsElement(document, move(qualified_name))); if (lowercase_tag_name == SVG::TagNames::ellipse) return adopt_ref(*new SVG::SVGEllipseElement(document, move(qualified_name))); if (lowercase_tag_name == SVG::TagNames::line) |