mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
Meta: Add formatter to PropertyID code generator
This commit is contained in:
parent
c03210e858
commit
cb4a5eca2e
Notes:
github-actions[bot]
2025-07-03 20:18:25 +00:00
Author: https://github.com/tcl3
Commit: cb4a5eca2e
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5293
Reviewed-by: https://github.com/AtkinsSJ ✅
1 changed files with 8 additions and 0 deletions
|
@ -322,6 +322,14 @@ template<>
|
|||
struct Traits<Web::CSS::PropertyID> : public DefaultTraits<Web::CSS::PropertyID> {
|
||||
static unsigned hash(Web::CSS::PropertyID property_id) { return int_hash((unsigned)property_id); }
|
||||
};
|
||||
|
||||
template<>
|
||||
struct Formatter<Web::CSS::PropertyID> : Formatter<StringView> {
|
||||
ErrorOr<void> format(FormatBuilder& builder, Web::CSS::PropertyID const& property_id)
|
||||
{
|
||||
return Formatter<StringView>::format(builder, Web::CSS::string_from_property_id(property_id));
|
||||
}
|
||||
};
|
||||
} // namespace AK
|
||||
)~~~");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue