2020-01-18 11:38:21 +03:00
|
|
|
/*
|
2022-03-10 01:53:41 +03:00
|
|
|
* Copyright (c) 2018-2022, Andreas Kling <kling@serenityos.org>
|
2020-01-18 11:38:21 +03:00
|
|
|
*
|
2021-04-22 11:24:48 +03:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-01-18 11:38:21 +03:00
|
|
|
*/
|
|
|
|
|
2021-10-06 21:02:41 +03:00
|
|
|
#include <LibWeb/Layout/BlockContainer.h>
|
2022-03-11 01:13:37 +03:00
|
|
|
#include <LibWeb/Painting/PaintableBox.h>
|
2019-06-15 23:49:44 +03:00
|
|
|
|
2020-11-22 17:53:01 +03:00
|
|
|
namespace Web::Layout {
|
2020-03-07 12:27:02 +03:00
|
|
|
|
2021-10-06 21:02:41 +03:00
|
|
|
BlockContainer::BlockContainer(DOM::Document& document, DOM::Node* node, NonnullRefPtr<CSS::StyleProperties> style)
|
2020-11-22 17:53:01 +03:00
|
|
|
: Box(document, node, move(style))
|
2019-06-15 23:49:44 +03:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2024-01-27 10:38:27 +03:00
|
|
|
BlockContainer::BlockContainer(DOM::Document& document, DOM::Node* node, NonnullOwnPtr<CSS::ComputedValues> computed_values)
|
2021-01-06 16:10:53 +03:00
|
|
|
: Box(document, node, move(computed_values))
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2022-03-14 22:21:51 +03:00
|
|
|
BlockContainer::~BlockContainer() = default;
|
2019-06-21 00:00:26 +03:00
|
|
|
|
2023-04-20 18:01:38 +03:00
|
|
|
Painting::PaintableWithLines const* BlockContainer::paintable_with_lines() const
|
2022-03-10 13:12:06 +03:00
|
|
|
{
|
2023-04-20 18:00:42 +03:00
|
|
|
return static_cast<Painting::PaintableWithLines const*>(Box::paintable_box());
|
2022-03-10 13:12:06 +03:00
|
|
|
}
|
|
|
|
|
2023-01-11 14:51:49 +03:00
|
|
|
JS::GCPtr<Painting::Paintable> BlockContainer::create_paintable() const
|
2022-03-10 16:02:25 +03:00
|
|
|
{
|
|
|
|
return Painting::PaintableWithLines::create(*this);
|
|
|
|
}
|
|
|
|
|
2020-03-07 12:27:02 +03:00
|
|
|
}
|