ladybird/Userland/Libraries/LibWeb/Layout/BlockContainer.cpp
Linus Groh a75915f055 LibWeb/Layout: Rename BlockContainer::paint{_box => able_with_lines}()
It returns a PaintableBox (a PaintableWithLines, to be specific), not a
'PaintBox'. paintable_box() without the cast is already available
through BlockContainer's Box base class, we don't need to shadow it.
2023-04-20 20:43:30 +02:00

35 lines
901 B
C++

/*
* Copyright (c) 2018-2022, Andreas Kling <kling@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <LibWeb/Layout/BlockContainer.h>
#include <LibWeb/Painting/PaintableBox.h>
namespace Web::Layout {
BlockContainer::BlockContainer(DOM::Document& document, DOM::Node* node, NonnullRefPtr<CSS::StyleProperties> style)
: Box(document, node, move(style))
{
}
BlockContainer::BlockContainer(DOM::Document& document, DOM::Node* node, CSS::ComputedValues computed_values)
: Box(document, node, move(computed_values))
{
}
BlockContainer::~BlockContainer() = default;
Painting::PaintableWithLines const* BlockContainer::paintable_with_lines() const
{
return static_cast<Painting::PaintableWithLines const*>(Box::paintable_box());
}
JS::GCPtr<Painting::Paintable> BlockContainer::create_paintable() const
{
return Painting::PaintableWithLines::create(*this);
}
}