LibWeb: Serialize Resolution according to spec

This commit is contained in:
stelar7 2023-05-27 22:30:10 +02:00 committed by Andreas Kling
commit 5cdeb994b2
Notes: sideshowbarker 2024-07-16 23:17:55 +09:00

View file

@ -22,7 +22,7 @@ Resolution::Resolution(float value, Type type)
ErrorOr<String> Resolution::to_string() const
{
return String::formatted("{}{}", m_value, unit_name());
return String::formatted("{}dppx", to_dots_per_pixel());
}
float Resolution::to_dots_per_pixel() const