mirror of
https://github.com/RGBCube/serenity
synced 2025-05-20 13:55:08 +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.
30 lines
771 B
C++
30 lines
771 B
C++
/*
|
|
* Copyright (c) 2020, Matthew Olsson <mattco@serenityos.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <LibWeb/Layout/ReplacedBox.h>
|
|
#include <LibWeb/SVG/SVGSVGElement.h>
|
|
|
|
namespace Web::Layout {
|
|
|
|
class SVGSVGBox final : public ReplacedBox {
|
|
JS_CELL(SVGSVGBox, ReplacedBox);
|
|
|
|
public:
|
|
SVGSVGBox(DOM::Document&, SVG::SVGSVGElement&, NonnullRefPtr<CSS::StyleProperties>);
|
|
virtual ~SVGSVGBox() override = default;
|
|
|
|
SVG::SVGSVGElement& dom_node() { return verify_cast<SVG::SVGSVGElement>(ReplacedBox::dom_node()); }
|
|
|
|
virtual bool can_have_children() const override { return true; }
|
|
|
|
virtual RefPtr<Painting::Paintable> create_paintable() const override;
|
|
|
|
virtual void prepare_for_replaced_layout() override;
|
|
};
|
|
|
|
}
|