/* * Copyright (c) 2023, MacDue * * SPDX-License-Identifier: BSD-2-Clause */ #include #include #include namespace Web::SVG { JS_DEFINE_ALLOCATOR(SVGTSpanElement); SVGTSpanElement::SVGTSpanElement(DOM::Document& document, DOM::QualifiedName qualified_name) : SVGTextPositioningElement(document, move(qualified_name)) { } void SVGTSpanElement::initialize(JS::Realm& realm) { Base::initialize(realm); WEB_SET_PROTOTYPE_FOR_INTERFACE(SVGTSpanElement); } JS::GCPtr SVGTSpanElement::create_layout_node(NonnullRefPtr style) { // Text must be within an SVG element. if (shadow_including_first_ancestor_of_type()) return heap().allocate_without_realm(document(), *this, move(style)); return {}; } }