LibWeb/CSS: Remove unnecessary shorthand serialization special cases

The serialization of these properties is improved by using the new
default behavior.
This commit is contained in:
Tim Ledbetter 2025-04-06 23:38:41 +01:00 committed by Sam Atkins
commit 263cb3f8ca
Notes: github-actions[bot] 2025-04-07 10:40:01 +00:00
5 changed files with 72 additions and 19 deletions

View file

@ -194,8 +194,6 @@ String ShorthandStyleValue::to_string(SerializationMode mode) const
}
case PropertyID::Flex:
return MUST(String::formatted("{} {} {}", longhand(PropertyID::FlexGrow)->to_string(mode), longhand(PropertyID::FlexShrink)->to_string(mode), longhand(PropertyID::FlexBasis)->to_string(mode)));
case PropertyID::FlexFlow:
return MUST(String::formatted("{} {}", longhand(PropertyID::FlexDirection)->to_string(mode), longhand(PropertyID::FlexWrap)->to_string(mode)));
case PropertyID::Font: {
auto font_style = longhand(PropertyID::FontStyle);
auto font_variant = longhand(PropertyID::FontVariant);
@ -350,8 +348,6 @@ String ShorthandStyleValue::to_string(SerializationMode mode) const
return start->to_string(mode);
return MUST(String::formatted("{} / {}", start->to_string(mode), end->to_string(mode)));
}
case PropertyID::ListStyle:
return MUST(String::formatted("{} {} {}", longhand(PropertyID::ListStylePosition)->to_string(mode), longhand(PropertyID::ListStyleImage)->to_string(mode), longhand(PropertyID::ListStyleType)->to_string(mode)));
case PropertyID::Overflow: {
auto overflow_x = longhand(PropertyID::OverflowX);
auto overflow_y = longhand(PropertyID::OverflowY);