1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 01:17:35 +00:00

LibWeb: Parse CSS text-decoration-thickness property

This commit is contained in:
Karol Kosek 2022-03-06 02:09:00 +01:00 committed by Andreas Kling
parent 727e69fe11
commit 0f7156ed81
4 changed files with 20 additions and 5 deletions

View file

@ -1451,14 +1451,16 @@ class TextDecorationStyleValue final : public StyleValue {
public:
static NonnullRefPtr<TextDecorationStyleValue> create(
NonnullRefPtr<StyleValue> line,
NonnullRefPtr<StyleValue> thickness,
NonnullRefPtr<StyleValue> style,
NonnullRefPtr<StyleValue> color)
{
return adopt_ref(*new TextDecorationStyleValue(line, style, color));
return adopt_ref(*new TextDecorationStyleValue(line, thickness, style, color));
}
virtual ~TextDecorationStyleValue() override { }
NonnullRefPtr<StyleValue> line() const { return m_line; }
NonnullRefPtr<StyleValue> thickness() const { return m_thickness; }
NonnullRefPtr<StyleValue> style() const { return m_style; }
NonnullRefPtr<StyleValue> color() const { return m_color; }
@ -1467,16 +1469,19 @@ public:
private:
TextDecorationStyleValue(
NonnullRefPtr<StyleValue> line,
NonnullRefPtr<StyleValue> thickness,
NonnullRefPtr<StyleValue> style,
NonnullRefPtr<StyleValue> color)
: StyleValue(Type::TextDecoration)
, m_line(line)
, m_thickness(thickness)
, m_style(style)
, m_color(color)
{
}
NonnullRefPtr<StyleValue> m_line;
NonnullRefPtr<StyleValue> m_thickness;
NonnullRefPtr<StyleValue> m_style;
NonnullRefPtr<StyleValue> m_color;
};