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 ed84fbce47 LibWeb: Make Paintable ref-counted
This will allow us to use a protective NonnullRefPtr to keep paintables
alive while running arbitrary JavaScript in response to events.
2022-03-11 00:21:49 +01:00

26 lines
684 B
C++

/*
* Copyright (c) 2020, Matthew Olsson <mattco@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibWeb/Layout/SVGGraphicsBox.h>
#include <LibWeb/SVG/SVGSVGElement.h>
namespace Web::Layout {
class SVGSVGBox final : public SVGGraphicsBox {
public:
SVGSVGBox(DOM::Document&, SVG::SVGSVGElement&, NonnullRefPtr<CSS::StyleProperties>);
virtual ~SVGSVGBox() override = default;
SVG::SVGSVGElement& dom_node() { return verify_cast<SVG::SVGSVGElement>(SVGGraphicsBox::dom_node()); }
virtual bool can_have_children() const override { return true; }
virtual RefPtr<Painting::Paintable> create_paintable() const override;
};
}