From d2b8686ae4807ab2791c20e8db7bab700d6e5f15 Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Tue, 12 Apr 2022 12:30:48 +0100 Subject: [PATCH] LibWeb: Add Formatter for ComponentValues --- Userland/Libraries/LibWeb/CSS/Parser/ComponentValue.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Userland/Libraries/LibWeb/CSS/Parser/ComponentValue.h b/Userland/Libraries/LibWeb/CSS/Parser/ComponentValue.h index 30fa3fa52c..0c8a49544b 100644 --- a/Userland/Libraries/LibWeb/CSS/Parser/ComponentValue.h +++ b/Userland/Libraries/LibWeb/CSS/Parser/ComponentValue.h @@ -44,3 +44,11 @@ private: Variant, NonnullRefPtr> m_value; }; } + +template<> +struct AK::Formatter : Formatter { + ErrorOr format(FormatBuilder& builder, Web::CSS::Parser::ComponentValue const& component_value) + { + return Formatter::format(builder, component_value.to_string()); + } +};