mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +00:00
LibWeb/CSS: Add Parser::Dimension::to_string()
This will be used when printing out unsupported dimensions inside calc, for a more useful error message.
This commit is contained in:
@@ -107,6 +107,11 @@ public:
|
||||
return percentage();
|
||||
}
|
||||
|
||||
String to_string() const
|
||||
{
|
||||
return m_value.visit([](auto const& it) { return it.to_string(); });
|
||||
}
|
||||
|
||||
private:
|
||||
Variant<Angle, Flex, Frequency, Length, Percentage, Resolution, Time> m_value;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user