/* * Copyright (c) 2020, Matthew Olsson * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include namespace Web::Layout { class SVGSVGBox final : public ReplacedBox { JS_CELL(SVGSVGBox, ReplacedBox); public: SVGSVGBox(DOM::Document&, SVG::SVGSVGElement&, NonnullRefPtr); virtual ~SVGSVGBox() override = default; SVG::SVGSVGElement& dom_node() { return verify_cast(ReplacedBox::dom_node()); } virtual bool can_have_children() const override { return true; } virtual JS::GCPtr create_paintable() const override; virtual void prepare_for_replaced_layout() override; private: virtual bool is_svg_svg_box() const final { return true; } }; template<> inline bool Node::fast_is() const { return is_svg_svg_box(); } }