1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 04:38:11 +00:00

LibWeb: Add new property 'text-decoration-style'

This patch makes the property 'text-decoration-style' known throughout
all the places in LibWeb that care.
This commit is contained in:
Tobias Christiansen 2022-01-20 20:27:55 +01:00 committed by Ali Mohammad Pur
parent 5348c67ba4
commit 69aac6ecd7
6 changed files with 57 additions and 0 deletions

View file

@ -163,6 +163,23 @@ static CSS::ValueID to_css_value_id(CSS::TextDecorationLine value)
VERIFY_NOT_REACHED();
}
static CSS::ValueID to_css_value_id(CSS::TextDecorationStyle value)
{
switch (value) {
case TextDecorationStyle::Solid:
return CSS::ValueID::Solid;
case TextDecorationStyle::Double:
return CSS::ValueID::Double;
case TextDecorationStyle::Dotted:
return CSS::ValueID::Dotted;
case TextDecorationStyle::Dashed:
return CSS::ValueID::Dashed;
case TextDecorationStyle::Wavy:
return CSS::ValueID::Wavy;
}
VERIFY_NOT_REACHED();
}
static CSS::ValueID to_css_value_id(CSS::Cursor value)
{
switch (value) {
@ -467,6 +484,8 @@ RefPtr<StyleValue> ResolvedCSSStyleDeclaration::style_value_for_property(Layout:
return IdentifierStyleValue::create(to_css_value_id(layout_node.computed_values().text_align()));
case CSS::PropertyID::TextDecorationLine:
return IdentifierStyleValue::create(to_css_value_id(layout_node.computed_values().text_decoration_line()));
case CSS::PropertyID::TextDecorationStyle:
return IdentifierStyleValue::create(to_css_value_id(layout_node.computed_values().text_decoration_style()));
case CSS::PropertyID::TextTransform:
return IdentifierStyleValue::create(to_css_value_id(layout_node.computed_values().text_transform()));
case CSS::PropertyID::Position: