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
commit 053766d79c
Notes: sideshowbarker 2024-07-18 05:37:06 +09:00
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>);