diff options
author | Andreas Kling <kling@serenityos.org> | 2022-11-10 13:49:26 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-11-16 13:01:21 +0100 |
commit | 05556846822752788198cec70be63bcd86ea61cb (patch) | |
tree | 8ebc781f154ab183a7fe0602f245284e97cb0e92 /Userland/Libraries/LibWeb/DOM/ElementFactory.cpp | |
parent | e9eba663618582bf4160911cbbb2fa61a979b939 (diff) | |
download | serenity-05556846822752788198cec70be63bcd86ea61cb.zip |
LibWeb: Sketch out basic support for SVG <foreignObject> elements
This patch adds basic DOM construction and IDL bindings for foreign
objects in SVG trees.
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 350ab64d2f..72281d0c51 100644 --- a/Userland/Libraries/LibWeb/DOM/ElementFactory.cpp +++ b/Userland/Libraries/LibWeb/DOM/ElementFactory.cpp @@ -81,6 +81,7 @@ #include <LibWeb/SVG/SVGClipPathElement.h> #include <LibWeb/SVG/SVGDefsElement.h> #include <LibWeb/SVG/SVGEllipseElement.h> +#include <LibWeb/SVG/SVGForeignObjectElement.h> #include <LibWeb/SVG/SVGGElement.h> #include <LibWeb/SVG/SVGLineElement.h> #include <LibWeb/SVG/SVGPathElement.h> @@ -273,6 +274,8 @@ JS::NonnullGCPtr<Element> create_element(Document& document, FlyString local_nam return *realm.heap().allocate<SVG::SVGDefsElement>(realm, document, move(qualified_name)); if (lowercase_tag_name == SVG::TagNames::ellipse) return *realm.heap().allocate<SVG::SVGEllipseElement>(realm, document, move(qualified_name)); + if (lowercase_tag_name.equals_ignoring_case(SVG::TagNames::foreignObject)) + return *realm.heap().allocate<SVG::SVGForeignObjectElement>(realm, document, move(qualified_name)); if (lowercase_tag_name == SVG::TagNames::line) return *realm.heap().allocate<SVG::SVGLineElement>(realm, document, move(qualified_name)); if (lowercase_tag_name == SVG::TagNames::path) |