mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 06:17:34 +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
|
@ -55,12 +55,12 @@ struct FormattingState {
|
|||
float border_box_width() const { return border_box_left() + content_width + border_box_right(); }
|
||||
float border_box_height() const { return border_box_top() + content_height + border_box_bottom(); }
|
||||
|
||||
Optional<Painting::Paintable::OverflowData> overflow_data;
|
||||
Optional<Painting::PaintableBox::OverflowData> overflow_data;
|
||||
|
||||
Painting::Paintable::OverflowData& ensure_overflow_data()
|
||||
Painting::PaintableBox::OverflowData& ensure_overflow_data()
|
||||
{
|
||||
if (!overflow_data.has_value())
|
||||
overflow_data = Painting::Paintable::OverflowData {};
|
||||
overflow_data = Painting::PaintableBox::OverflowData {};
|
||||
return *overflow_data;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue