summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/Layout/InlineNode.cpp
blob: 2f205099d4c33f24f3bfec23a3f0e78d2b2a8aba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/*
 * Copyright (c) 2018-2022, Andreas Kling <kling@serenityos.org>
 * Copyright (c) 2021, Sam Atkins <atkinssj@serenityos.org>
 *
 * SPDX-License-Identifier: BSD-2-Clause
 */

#include <LibWeb/DOM/Document.h>
#include <LibWeb/DOM/Element.h>
#include <LibWeb/Layout/BlockContainer.h>
#include <LibWeb/Layout/InlineFormattingContext.h>
#include <LibWeb/Layout/InlineNode.h>
#include <LibWeb/Painting/InlinePaintable.h>

namespace Web::Layout {

InlineNode::InlineNode(DOM::Document& document, DOM::Element* element, NonnullRefPtr<CSS::StyleProperties> style)
    : Layout::NodeWithStyleAndBoxModelMetrics(document, element, move(style))
{
    set_inline(true);
}

InlineNode::~InlineNode()
{
}

RefPtr<Painting::Paintable> InlineNode::create_paintable() const
{
    return Painting::InlinePaintable::create(*this);
}

}