1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 01:07:35 +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:
Andreas Kling 2022-03-10 15:50:57 +01:00
parent 0500dbc3f6
commit 053766d79c
34 changed files with 133 additions and 95 deletions

View file

@ -20,10 +20,7 @@ struct LineBoxFragmentCoordinate {
class Box : public NodeWithStyleAndBoxModelMetrics {
public:
Painting::Paintable const* paint_box() const { return m_paint_box.ptr(); }
void set_paint_box(OwnPtr<Painting::Paintable>);
OwnPtr<Painting::Paintable> m_paint_box;
Painting::PaintableBox const* paint_box() const;
bool is_out_of_flow(FormattingContext const&) const;
@ -44,7 +41,7 @@ public:
virtual void did_set_rect() { }
virtual OwnPtr<Painting::Paintable> create_paintable() const;
virtual OwnPtr<Painting::Paintable> create_paintable() const override;
protected:
Box(DOM::Document&, DOM::Node*, NonnullRefPtr<CSS::StyleProperties>);