/* * Copyright (c) 2023, MacDue * * SPDX-License-Identifier: BSD-2-Clause */ #include #include #include #include namespace Web::SVG { GC_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); } GC::Ptr SVGTSpanElement::create_layout_node(GC::Ref style) { // Text must be within an SVG element. if (shadow_including_first_ancestor_of_type()) return heap().allocate(document(), *this, move(style)); return {}; } }