summaryrefslogtreecommitdiff
path: root/Libraries/LibHTML/Layout/LayoutImage.h
blob: 344797769c0964d4191693b0898f316457dcc37a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#pragma once

#include <LibHTML/DOM/HTMLImageElement.h>
#include <LibHTML/Layout/LayoutReplaced.h>

class HTMLImageElement;

class LayoutImage : public LayoutReplaced {
public:
    LayoutImage(const HTMLImageElement&, NonnullRefPtr<StyleProperties>);
    virtual ~LayoutImage() override;

    virtual void layout() override;
    virtual void render(RenderingContext&) override;

    const HTMLImageElement& node() const { return static_cast<const HTMLImageElement&>(LayoutReplaced::node()); }

    bool renders_as_alt_text() const;

private:
    virtual const char* class_name() const override { return "LayoutImage"; }
};