1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 15:47:44 +00:00

LibWeb: Store all background properties in BackgroundLayerData

All of this is now passed along to `paint_background()`. :^)

(As always, "all" excludes the background-color since that's not a layer
property.)
This commit is contained in:
Sam Atkins 2021-11-12 16:30:21 +00:00 committed by Andreas Kling
parent 3d127472ba
commit aa43bee0d1
3 changed files with 96 additions and 5 deletions

View file

@ -39,9 +39,19 @@ public:
};
struct BackgroundLayerData {
RefPtr<CSS::ImageStyleValue> image;
CSS::Repeat repeat_x;
CSS::Repeat repeat_y;
RefPtr<CSS::ImageStyleValue> image { nullptr };
CSS::BackgroundAttachment attachment { CSS::BackgroundAttachment::Scroll };
CSS::BackgroundBox origin { CSS::BackgroundBox::PaddingBox };
CSS::BackgroundBox clip { CSS::BackgroundBox::BorderBox };
CSS::PositionEdge position_edge_x { CSS::PositionEdge::Left };
CSS::Length position_offset_x { CSS::Length::make_px(0) };
CSS::PositionEdge position_edge_y { CSS::PositionEdge::Top };
CSS::Length position_offset_y { CSS::Length::make_px(0) };
CSS::BackgroundSize size_type { CSS::BackgroundSize::LengthPercentage };
CSS::Length size_x { CSS::Length::make_auto() };
CSS::Length size_y { CSS::Length::make_auto() };
CSS::Repeat repeat_x { CSS::Repeat::Repeat };
CSS::Repeat repeat_y { CSS::Repeat::Repeat };
};
struct BorderData {