1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 15:38:10 +00:00

LibWeb: Add non-const version of paintable_box() in Layout::Node

Allows to remove a bunch of const_cast's
This commit is contained in:
Aliaksandr Kalenik 2023-08-07 00:51:05 +02:00 committed by Andreas Kling
parent dc08e9138c
commit 6868ace8f4
3 changed files with 11 additions and 5 deletions

View file

@ -77,6 +77,11 @@ JS::GCPtr<Painting::Paintable> Box::create_paintable() const
return Painting::PaintableBox::create(*this);
}
Painting::PaintableBox* Box::paintable_box()
{
return static_cast<Painting::PaintableBox*>(Node::paintable());
}
Painting::PaintableBox const* Box::paintable_box() const
{
return static_cast<Painting::PaintableBox const*>(Node::paintable());