From ef2469bfed7f2afff9e7da8eb9d1e4c68ca39bbd Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Wed, 27 Jul 2022 11:41:31 +0100 Subject: LibWeb: Add missing Formatters for CSS dimension types --- Userland/Libraries/LibWeb/CSS/Frequency.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Userland/Libraries/LibWeb/CSS/Frequency.h') diff --git a/Userland/Libraries/LibWeb/CSS/Frequency.h b/Userland/Libraries/LibWeb/CSS/Frequency.h index c71cc67a1a..0c0c326549 100644 --- a/Userland/Libraries/LibWeb/CSS/Frequency.h +++ b/Userland/Libraries/LibWeb/CSS/Frequency.h @@ -7,6 +7,7 @@ #pragma once #include +#include #include namespace Web::CSS { @@ -50,4 +51,13 @@ private: float m_value { 0 }; RefPtr m_calculated_style; }; + } + +template<> +struct AK::Formatter : Formatter { + ErrorOr format(FormatBuilder& builder, Web::CSS::Frequency const& frequency) + { + return Formatter::format(builder, frequency.to_string()); + } +}; -- cgit v1.2.3