1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-28 16:15:10 +00:00

LibWeb: Replace TextDecorationStyleValue with ShorthandStyleValue

This commit is contained in:
Sam Atkins 2023-09-20 15:52:44 +01:00 committed by Sam Atkins
parent d40b3f2a34
commit 8efac89a16
11 changed files with 8 additions and 95 deletions

View file

@ -33,7 +33,6 @@
#include <LibWeb/CSS/StyleValues/ShadowStyleValue.h>
#include <LibWeb/CSS/StyleValues/ShorthandStyleValue.h>
#include <LibWeb/CSS/StyleValues/StyleValueList.h>
#include <LibWeb/CSS/StyleValues/TextDecorationStyleValue.h>
#include <LibWeb/CSS/StyleValues/TimeStyleValue.h>
#include <LibWeb/CSS/StyleValues/TransformationStyleValue.h>
#include <LibWeb/CSS/StyleValues/URLStyleValue.h>
@ -418,7 +417,9 @@ RefPtr<StyleValue const> ResolvedCSSStyleDeclaration::style_value_for_property(L
auto thickness = style_value_for_property(layout_node, PropertyID::TextDecorationThickness);
auto style = style_value_for_property(layout_node, PropertyID::TextDecorationStyle);
auto color = style_value_for_property(layout_node, PropertyID::TextDecorationColor);
return TextDecorationStyleValue::create(*line, *thickness, *style, *color);
return ShorthandStyleValue::create(PropertyID::TextDecoration,
{ PropertyID::TextDecorationLine, PropertyID::TextDecorationThickness, PropertyID::TextDecorationStyle, PropertyID::TextDecorationColor },
{ line.release_nonnull(), thickness.release_nonnull(), style.release_nonnull(), color.release_nonnull() });
}
case PropertyID::TextDecorationColor:
return ColorStyleValue::create(layout_node.computed_values().text_decoration_color());