LibWeb: Set the correct prototype for SVGAElement instances

This commit is contained in:
Andreas Kling 2024-06-28 14:51:57 +02:00 committed by Andreas Kling
commit 4db05ecf69
Notes: sideshowbarker 2024-07-17 06:20:50 +09:00
4 changed files with 19 additions and 2 deletions

View file

@ -4,6 +4,7 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <LibWeb/Bindings/SVGAElementPrototype.h>
#include <LibWeb/Layout/SVGGraphicsBox.h>
#include <LibWeb/SVG/SVGAElement.h>
@ -18,6 +19,12 @@ SVGAElement::SVGAElement(DOM::Document& document, DOM::QualifiedName qualified_n
SVGAElement::~SVGAElement() = default;
void SVGAElement::initialize(JS::Realm& realm)
{
Base::initialize(realm);
WEB_SET_PROTOTYPE_FOR_INTERFACE(SVGAElement);
}
JS::GCPtr<Layout::Node> SVGAElement::create_layout_node(NonnullRefPtr<CSS::StyleProperties> style)
{
return heap().allocate_without_realm<Layout::SVGGraphicsBox>(document(), *this, move(style));