mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 03:57:43 +00:00
LibWeb: Split Paintable into Paintable and PaintableBox
To prepare for paintable inline content, we take the basic painting functionality and hoist it into a base class.
This commit is contained in:
parent
0500dbc3f6
commit
053766d79c
34 changed files with 133 additions and 95 deletions
|
@ -34,11 +34,6 @@ Box::~Box()
|
|||
{
|
||||
}
|
||||
|
||||
void Box::set_paint_box(OwnPtr<Painting::Paintable> paint_box)
|
||||
{
|
||||
m_paint_box = move(paint_box);
|
||||
}
|
||||
|
||||
// https://www.w3.org/TR/css-display-3/#out-of-flow
|
||||
bool Box::is_out_of_flow(FormattingContext const& formatting_context) const
|
||||
{
|
||||
|
@ -93,7 +88,12 @@ bool Box::is_body() const
|
|||
|
||||
OwnPtr<Painting::Paintable> Box::create_paintable() const
|
||||
{
|
||||
return Painting::Paintable::create(*this);
|
||||
return Painting::PaintableBox::create(*this);
|
||||
}
|
||||
|
||||
Painting::PaintableBox const* Box::paint_box() const
|
||||
{
|
||||
return static_cast<Painting::PaintableBox const*>(Node::paintable());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue