1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:17:45 +00:00

LibWeb: Refactor SVG files into their own directory; follow spec layout

This commit is contained in:
Matthew Olsson 2020-07-23 09:44:42 -07:00 committed by Andreas Kling
parent 2e73082203
commit b1299f972c
17 changed files with 386 additions and 172 deletions

View file

@ -41,14 +41,15 @@
#include <LibWeb/DOM/HTMLInputElement.h>
#include <LibWeb/DOM/HTMLLinkElement.h>
#include <LibWeb/DOM/HTMLObjectElement.h>
#include <LibWeb/DOM/HTMLPathElement.h>
#include <LibWeb/DOM/HTMLScriptElement.h>
#include <LibWeb/DOM/HTMLStyleElement.h>
#include <LibWeb/DOM/HTMLSvgElement.h>
#include <LibWeb/DOM/HTMLTableCellElement.h>
#include <LibWeb/DOM/HTMLTableElement.h>
#include <LibWeb/DOM/HTMLTableRowElement.h>
#include <LibWeb/DOM/HTMLTitleElement.h>
#include <LibWeb/SVG/SVGPathElement.h>
#include <LibWeb/SVG/SVGSVGElement.h>
#include <LibWeb/SVG/TagNames.h>
namespace Web {
@ -99,10 +100,10 @@ NonnullRefPtr<Element> create_element(Document& document, const FlyString& tag_n
return adopt(*new HTMLCanvasElement(document, lowercase_tag_name));
if (lowercase_tag_name == HTML::TagNames::object)
return adopt(*new HTMLObjectElement(document, lowercase_tag_name));
if (lowercase_tag_name == HTML::TagNames::svg)
return adopt(*new HTMLSvgElement(document, lowercase_tag_name));
if (lowercase_tag_name == HTML::TagNames::path)
return adopt(*new HTMLPathElement(document, lowercase_tag_name));
if (lowercase_tag_name == SVG::TagNames::svg)
return adopt(*new SVG::SVGSVGElement(document, lowercase_tag_name));
if (lowercase_tag_name == SVG::TagNames::path)
return adopt(*new SVG::SVGPathElement(document, lowercase_tag_name));
return adopt(*new Element(document, lowercase_tag_name));
}