mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 12:49:19 +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:
parent
f3a9bb0a91
commit
cef1cb6aa7
Notes:
github-actions[bot]
2024-12-18 12:22:34 +00:00
Author: https://github.com/AtkinsSJ
Commit: cef1cb6aa7
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2949
Reviewed-by: https://github.com/LucasChollet ✅
1 changed files with 5 additions and 0 deletions
|
@ -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;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue