mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 11:57:35 +00:00
LibWeb: Parse background-attachment
as part of background
property
This commit is contained in:
parent
116a5fe5d0
commit
018a4aa85c
4 changed files with 39 additions and 8 deletions
|
@ -379,12 +379,14 @@ public:
|
|||
NonnullRefPtr<StyleValue> image,
|
||||
NonnullRefPtr<StyleValue> position,
|
||||
NonnullRefPtr<StyleValue> repeat_x,
|
||||
NonnullRefPtr<StyleValue> repeat_y)
|
||||
NonnullRefPtr<StyleValue> repeat_y,
|
||||
NonnullRefPtr<StyleValue> attachment)
|
||||
{
|
||||
return adopt_ref(*new BackgroundStyleValue(color, image, position, repeat_x, repeat_y));
|
||||
return adopt_ref(*new BackgroundStyleValue(color, image, position, repeat_x, repeat_y, attachment));
|
||||
}
|
||||
virtual ~BackgroundStyleValue() override { }
|
||||
|
||||
NonnullRefPtr<StyleValue> attachment() const { return m_attachment; }
|
||||
NonnullRefPtr<StyleValue> color() const { return m_color; }
|
||||
NonnullRefPtr<StyleValue> image() const { return m_image; }
|
||||
NonnullRefPtr<StyleValue> position() const { return m_position; }
|
||||
|
@ -393,7 +395,7 @@ public:
|
|||
|
||||
virtual String to_string() const override
|
||||
{
|
||||
return String::formatted("{} {} {} {} {}", m_color->to_string(), m_image->to_string(), m_position->to_string(), m_repeat_x->to_string(), m_repeat_y->to_string());
|
||||
return String::formatted("{} {} {} {} {} {}", m_color->to_string(), m_image->to_string(), m_position->to_string(), m_repeat_x->to_string(), m_repeat_y->to_string(), m_attachment->to_string());
|
||||
}
|
||||
|
||||
private:
|
||||
|
@ -402,13 +404,15 @@ private:
|
|||
NonnullRefPtr<StyleValue> image,
|
||||
NonnullRefPtr<StyleValue> position,
|
||||
NonnullRefPtr<StyleValue> repeat_x,
|
||||
NonnullRefPtr<StyleValue> repeat_y)
|
||||
NonnullRefPtr<StyleValue> repeat_y,
|
||||
NonnullRefPtr<StyleValue> attachment)
|
||||
: StyleValue(Type::Background)
|
||||
, m_color(color)
|
||||
, m_image(image)
|
||||
, m_position(position)
|
||||
, m_repeat_x(repeat_x)
|
||||
, m_repeat_y(repeat_y)
|
||||
, m_attachment(attachment)
|
||||
{
|
||||
}
|
||||
NonnullRefPtr<StyleValue> m_color;
|
||||
|
@ -417,7 +421,7 @@ private:
|
|||
// FIXME: background-size
|
||||
NonnullRefPtr<StyleValue> m_repeat_x;
|
||||
NonnullRefPtr<StyleValue> m_repeat_y;
|
||||
// FIXME: background-attachment
|
||||
NonnullRefPtr<StyleValue> m_attachment;
|
||||
// FIXME: background-clip
|
||||
// FIXME: background-origin
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue