Coverage Report

Created: 2025-09-05 06:52

/src/serenity/Userland/Libraries/LibWeb/Layout/CanvasBox.h
Line
Count
Source (jump to first uncovered line)
1
/*
2
 * Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
3
 *
4
 * SPDX-License-Identifier: BSD-2-Clause
5
 */
6
7
#pragma once
8
9
#include <LibWeb/HTML/HTMLCanvasElement.h>
10
#include <LibWeb/Layout/ReplacedBox.h>
11
12
namespace Web::Layout {
13
14
class CanvasBox final : public ReplacedBox {
15
    JS_CELL(CanvasBox, ReplacedBox);
16
    JS_DECLARE_ALLOCATOR(CanvasBox);
17
18
public:
19
    CanvasBox(DOM::Document&, HTML::HTMLCanvasElement&, NonnullRefPtr<CSS::StyleProperties>);
20
    virtual ~CanvasBox() override;
21
22
    virtual void prepare_for_replaced_layout() override;
23
24
0
    const HTML::HTMLCanvasElement& dom_node() const { return static_cast<const HTML::HTMLCanvasElement&>(ReplacedBox::dom_node()); }
25
26
    virtual JS::GCPtr<Painting::Paintable> create_paintable() const override;
27
};
28
29
}