LibWeb: Serialize Resolution according to spec

This commit is contained in:
stelar7
2023-05-27 22:30:10 +02:00
committed by Andreas Kling
parent b6d767fbb0
commit 5cdeb994b2

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