summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/CSS
diff options
context:
space:
mode:
authorSam Atkins <atkinssj@serenityos.org>2022-04-12 12:30:48 +0100
committerAndreas Kling <kling@serenityos.org>2022-04-12 23:03:46 +0200
commitd2b8686ae4807ab2791c20e8db7bab700d6e5f15 (patch)
tree6467561fd35e9d18c2663d16b0000e3f46020940 /Userland/Libraries/LibWeb/CSS
parentfff2c35f512a21e414ade5aea8f9f6d237d6eb4f (diff)
downloadserenity-d2b8686ae4807ab2791c20e8db7bab700d6e5f15.zip
LibWeb: Add Formatter for ComponentValues
Diffstat (limited to 'Userland/Libraries/LibWeb/CSS')
-rw-r--r--Userland/Libraries/LibWeb/CSS/Parser/ComponentValue.h8
1 files changed, 8 insertions, 0 deletions
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<Token, NonnullRefPtr<StyleFunctionRule>, NonnullRefPtr<StyleBlockRule>> m_value;
};
}
+
+template<>
+struct AK::Formatter<Web::CSS::Parser::ComponentValue> : Formatter<StringView> {
+ ErrorOr<void> format(FormatBuilder& builder, Web::CSS::Parser::ComponentValue const& component_value)
+ {
+ return Formatter<StringView>::format(builder, component_value.to_string());
+ }
+};