From cb4a5eca2ece424da730ed02ebc21135cc7368e1 Mon Sep 17 00:00:00 2001 From: Tim Ledbetter Date: Thu, 3 Jul 2025 20:49:26 +0100 Subject: [PATCH] Meta: Add formatter to PropertyID code generator --- .../Tools/CodeGenerators/LibWeb/GenerateCSSPropertyID.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Meta/Lagom/Tools/CodeGenerators/LibWeb/GenerateCSSPropertyID.cpp b/Meta/Lagom/Tools/CodeGenerators/LibWeb/GenerateCSSPropertyID.cpp index eda057e8183..e34e97bf441 100644 --- a/Meta/Lagom/Tools/CodeGenerators/LibWeb/GenerateCSSPropertyID.cpp +++ b/Meta/Lagom/Tools/CodeGenerators/LibWeb/GenerateCSSPropertyID.cpp @@ -322,6 +322,14 @@ template<> struct Traits : public DefaultTraits { static unsigned hash(Web::CSS::PropertyID property_id) { return int_hash((unsigned)property_id); } }; + +template<> +struct Formatter : Formatter { + ErrorOr format(FormatBuilder& builder, Web::CSS::PropertyID const& property_id) + { + return Formatter::format(builder, Web::CSS::string_from_property_id(property_id)); + } +}; } // namespace AK )~~~");