/* * Copyright (c) 2023, MacDue * * SPDX-License-Identifier: BSD-2-Clause */ #include #include #include namespace Web::SVG { SVGTSpanElement::SVGTSpanElement(DOM::Document& document, DOM::QualifiedName qualified_name) : SVGTextPositioningElement(document, move(qualified_name)) { } void SVGTSpanElement::initialize(JS::Realm& realm) { Base::initialize(realm); set_prototype(&Bindings::ensure_web_prototype(realm, "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 {}; } }