LibWeb: Use generated to_string() function for EdgeStyleValue edge

This commit is contained in:
Sam Atkins 2023-11-06 12:06:20 +00:00 committed by Sam Atkins
parent f918785698
commit 88dc5886eb

View file

@ -10,21 +10,7 @@ namespace Web::CSS {
String EdgeStyleValue::to_string() const
{
auto to_string = [](PositionEdge edge) {
switch (edge) {
case PositionEdge::Left:
return "left";
case PositionEdge::Right:
return "right";
case PositionEdge::Top:
return "top";
case PositionEdge::Bottom:
return "bottom";
}
VERIFY_NOT_REACHED();
};
return MUST(String::formatted("{} {}", to_string(m_properties.edge), m_properties.offset.to_string()));
return MUST(String::formatted("{} {}", CSS::to_string(m_properties.edge), m_properties.offset.to_string()));
}
}