1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:57:45 +00:00

LibWeb: Store background layers in ComputedValues

Instead of storing these as individual `background-foo` properties, we
combine them together into layers, since that is how they will be
painted. It also makes it more convenient to pass them around.
This commit is contained in:
Sam Atkins 2021-11-12 12:11:01 +00:00 committed by Andreas Kling
parent 64d805a027
commit cdeac132dc
6 changed files with 86 additions and 1 deletions

View file

@ -206,6 +206,7 @@ public:
float line_height() const { return m_line_height; }
float font_size() const { return m_font_size; }
const CSS::ImageStyleValue* background_image() const { return m_background_image; }
Vector<CSS::BackgroundLayerData> const& background_layers() const { return computed_values().background_layers(); }
const CSS::ImageStyleValue* list_style_image() const { return m_list_style_image; }
NonnullRefPtr<NodeWithStyle> create_anonymous_wrapper() const;