/* * 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)) { } JS::ThrowCompletionOr SVGTSpanElement::initialize(JS::Realm& realm) { MUST_OR_THROW_OOM(Base::initialize(realm)); set_prototype(&Bindings::ensure_web_prototype(realm, "SVGTSpanElement")); return {}; } 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 {}; } }