mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-25 14:05:15 +00:00
This removes a set of complex reference cycles between DOM, layout tree and browsing context. It also makes lifetimes much easier to reason about, as the DOM and layout trees are now free to keep each other alive.
24 lines
627 B
C++
24 lines
627 B
C++
/*
|
|
* Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#include <AK/StringBuilder.h>
|
|
#include <LibWeb/DOM/Document.h>
|
|
#include <LibWeb/Layout/SVGGraphicsBox.h>
|
|
#include <LibWeb/SVG/SVGGElement.h>
|
|
|
|
namespace Web::SVG {
|
|
|
|
SVGGElement::SVGGElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
|
: SVGGraphicsElement(document, move(qualified_name))
|
|
{
|
|
}
|
|
|
|
JS::GCPtr<Layout::Node> SVGGElement::create_layout_node(NonnullRefPtr<CSS::StyleProperties> style)
|
|
{
|
|
return heap().allocate_without_realm<Layout::SVGGraphicsBox>(document(), *this, move(style));
|
|
}
|
|
|
|
}
|