mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-29 14:14:45 +03:00
LibWeb: Limit length values to 5 decimal places when serializing
This commit is contained in:
parent
7dcf060927
commit
0487485fb1
Notes:
sideshowbarker
2024-07-17 04:34:25 +09:00
Author: https://github.com/mattco98 Commit: https://github.com/SerenityOS/serenity/commit/0487485fb1 Pull-request: https://github.com/SerenityOS/serenity/pull/23449
@ -184,7 +184,7 @@ String Length::to_string() const
|
|||||||
{
|
{
|
||||||
if (is_auto())
|
if (is_auto())
|
||||||
return "auto"_string;
|
return "auto"_string;
|
||||||
return MUST(String::formatted("{}{}", m_value, unit_name()));
|
return MUST(String::formatted("{:.5}{}", m_value, unit_name()));
|
||||||
}
|
}
|
||||||
|
|
||||||
char const* Length::unit_name() const
|
char const* Length::unit_name() const
|
||||||
|
Loading…
Reference in New Issue
Block a user