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

LibWeb: Add SVGDefsElement

* Similarly to clipPath, this doesn't need to get rendered, so return no
  LayoutNode.
This commit is contained in:
Simon Danner 2022-04-11 16:59:03 +02:00 committed by Andreas Kling
parent 55e9192886
commit bd90498332
8 changed files with 62 additions and 0 deletions

View file

@ -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)