1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 07:48:12 +00:00

LibWeb: Generate and use to_string(css_enum) functions

The only one that's actually used is for Repeat, but it's easy to
generate them so might as well. :^)
This commit is contained in:
Sam Atkins 2022-04-13 20:15:20 +01:00 committed by Andreas Kling
parent ae40e9a66c
commit c50661067d
2 changed files with 26 additions and 16 deletions

View file

@ -72,22 +72,6 @@ inline Gfx::Painter::ScalingMode to_gfx_scaling_mode(CSS::ImageRendering css_val
VERIFY_NOT_REACHED();
}
constexpr StringView to_string(Repeat value)
{
switch (value) {
case Repeat::NoRepeat:
return "no-repeat"sv;
case Repeat::Repeat:
return "repeat"sv;
case Repeat::Round:
return "round"sv;
case Repeat::Space:
return "space"sv;
default:
VERIFY_NOT_REACHED();
}
}
enum class TransformFunction {
Matrix,
Translate,