1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-30 22:58:12 +00:00
serenity/Userland/Libraries/LibWeb/Layout/SVGSVGBox.h
Andreas Kling 4d401bf796 LibWeb: Make the paint tree GC-allocated
This simplifies the ownership model between DOM/layout/paint nodes
immensely by deferring to the garbage collector for figuring out what's
live and what's not.
2023-01-11 12:55:00 +01:00

30 lines
774 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 JS::GCPtr<Painting::Paintable> create_paintable() const override;
virtual void prepare_for_replaced_layout() override;
};
}