LibWeb: Move formatter for Percentage into Percentage.h

This commit is contained in:
Callum Law 2025-08-06 22:04:12 +12:00 committed by Sam Atkins
commit f15153ea86
Notes: github-actions[bot] 2025-08-11 16:11:32 +00:00
2 changed files with 8 additions and 8 deletions

View file

@ -47,3 +47,11 @@ private:
};
}
template<>
struct AK::Formatter<Web::CSS::Percentage> : Formatter<StringView> {
ErrorOr<void> format(FormatBuilder& builder, Web::CSS::Percentage const& percentage)
{
return Formatter<StringView>::format(builder, percentage.to_string());
}
};

View file

@ -232,14 +232,6 @@ public:
}
template<>
struct AK::Formatter<Web::CSS::Percentage> : Formatter<StringView> {
ErrorOr<void> format(FormatBuilder& builder, Web::CSS::Percentage const& percentage)
{
return Formatter<StringView>::format(builder, percentage.to_string());
}
};
template<>
struct AK::Formatter<Web::CSS::AnglePercentage> : Formatter<StringView> {
ErrorOr<void> format(FormatBuilder& builder, Web::CSS::AnglePercentage const& angle_percentage)