/* * 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) { WEB_SET_PROTOTYPE_FOR_INTERFACE(SVGTSpanElement); Base::initialize(realm); } RefPtr SVGTSpanElement::create_layout_node(CSS::ComputedProperties const& style) { // Text must be within an SVG element. if (first_flat_tree_ancestor_of_type()) return make_ref_counted(document(), *this, style); return {}; } }