1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:37:35 +00:00

LibWeb: Move Declaration code into Declaration.cpp

This commit is contained in:
Sam Atkins 2022-04-12 14:14:00 +01:00 committed by Andreas Kling
parent 3e49036edf
commit 6848a0ef05
3 changed files with 31 additions and 17 deletions

View file

@ -33,9 +33,6 @@ StyleRule::StyleRule(StyleRule::Type type)
}
StyleRule::~StyleRule() = default;
Declaration::Declaration() = default;
Declaration::~Declaration() = default;
template<class SeparatorType, class CollectionType>
void append_with_to_string(StringBuilder& builder, SeparatorType& separator, CollectionType& collection)
{
@ -83,18 +80,4 @@ String StyleRule::to_string() const
return builder.to_string();
}
String Declaration::to_string() const
{
StringBuilder builder;
serialize_an_identifier(builder, m_name);
builder.append(": ");
append_with_to_string(builder, " ", m_values);
if (m_important == Important::Yes)
builder.append(" !important");
return builder.to_string();
}
}