LibWeb/SVG: Implement SVGImageElement

This element allows images to be embedded within SVGs.
This commit is contained in:
Tim Ledbetter 2024-08-20 15:12:55 +01:00 committed by Andreas Kling
commit 03bbc2b111
Notes: github-actions[bot] 2024-08-29 04:29:33 +00:00
17 changed files with 490 additions and 8 deletions

View file

@ -92,6 +92,7 @@
#include <LibWeb/SVG/SVGEllipseElement.h>
#include <LibWeb/SVG/SVGForeignObjectElement.h>
#include <LibWeb/SVG/SVGGElement.h>
#include <LibWeb/SVG/SVGImageElement.h>
#include <LibWeb/SVG/SVGLineElement.h>
#include <LibWeb/SVG/SVGLinearGradientElement.h>
#include <LibWeb/SVG/SVGMaskElement.h>
@ -488,6 +489,8 @@ static JS::GCPtr<SVG::SVGElement> create_svg_element(JS::Realm& realm, Document&
return realm.heap().allocate<SVG::SVGScriptElement>(realm, document, move(qualified_name));
if (local_name == SVG::TagNames::a)
return realm.heap().allocate<SVG::SVGAElement>(realm, document, move(qualified_name));
if (local_name == SVG::TagNames::image)
return realm.heap().allocate<SVG::SVGImageElement>(realm, document, move(qualified_name));
return nullptr;
}