2020-01-18 05:38:21 -03:00
|
|
|
/*
|
2022-02-05 21:39:20 -03:00
|
|
|
* Copyright (c) 2018-2022, Andreas Kling <kling@serenityos.org>
|
2021-09-19 13:16:00 -03:00
|
|
|
* Copyright (c) 2021, Sam Atkins <atkinssj@serenityos.org>
|
2020-01-18 05:38:21 -03:00
|
|
|
*
|
2021-04-22 05:24:48 -03:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-01-18 05:38:21 -03:00
|
|
|
*/
|
|
|
|
|
|
2021-08-19 08:20:43 -03:00
|
|
|
#include <LibWeb/DOM/Document.h>
|
2020-03-07 06:32:51 -03:00
|
|
|
#include <LibWeb/DOM/Element.h>
|
2021-10-06 15:02:41 -03:00
|
|
|
#include <LibWeb/Layout/BlockContainer.h>
|
2020-12-05 16:10:39 -03:00
|
|
|
#include <LibWeb/Layout/InlineFormattingContext.h>
|
2020-11-22 11:53:01 -03:00
|
|
|
#include <LibWeb/Layout/InlineNode.h>
|
2022-03-10 11:38:34 -03:00
|
|
|
#include <LibWeb/Painting/InlinePaintable.h>
|
2019-10-17 18:09:41 -03:00
|
|
|
|
2020-11-22 11:53:01 -03:00
|
|
|
namespace Web::Layout {
|
2020-03-07 06:27:02 -03:00
|
|
|
|
2022-02-23 17:25:35 -03:00
|
|
|
InlineNode::InlineNode(DOM::Document& document, DOM::Element* element, NonnullRefPtr<CSS::StyleProperties> style)
|
|
|
|
|
: Layout::NodeWithStyleAndBoxModelMetrics(document, element, move(style))
|
2019-10-17 18:09:41 -03:00
|
|
|
{
|
2020-11-22 11:53:01 -03:00
|
|
|
set_inline(true);
|
2019-10-17 18:09:41 -03:00
|
|
|
}
|
|
|
|
|
|
2022-03-14 16:21:51 -03:00
|
|
|
InlineNode::~InlineNode() = default;
|
2019-10-17 18:09:41 -03:00
|
|
|
|
2022-03-10 18:38:08 -03:00
|
|
|
RefPtr<Painting::Paintable> InlineNode::create_paintable() const
|
2020-12-03 15:21:33 -03:00
|
|
|
{
|
2022-03-10 11:38:34 -03:00
|
|
|
return Painting::InlinePaintable::create(*this);
|
2021-09-19 13:16:00 -03:00
|
|
|
}
|
|
|
|
|
|
2020-03-07 06:27:02 -03:00
|
|
|
}
|