/* * Copyright (c) 2020, Andreas Kling * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include namespace Web::Layout { class CanvasBox final : public ReplacedBox { JS_CELL(CanvasBox, ReplacedBox); public: CanvasBox(DOM::Document&, HTML::HTMLCanvasElement&, NonnullRefPtr); virtual ~CanvasBox() override; virtual void prepare_for_replaced_layout() override; const HTML::HTMLCanvasElement& dom_node() const { return static_cast(ReplacedBox::dom_node()); } virtual JS::GCPtr create_paintable() const override; }; }