mirror of
https://github.com/SerenityOS/serenity
synced 2024-10-07 00:19:27 +00:00
LibWeb: Use generated to_string() function for EdgeStyleValue edge
This commit is contained in:
parent
f918785698
commit
88dc5886eb
|
@ -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()));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue