mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:17:44 +00:00
LibWeb: Move StyleFunctionRule code into StyleFunctionRule.cpp
This commit is contained in:
parent
d2b8686ae4
commit
084780a0a2
3 changed files with 39 additions and 24 deletions
|
@ -39,18 +39,6 @@ StyleBlockRule::~StyleBlockRule() = default;
|
|||
Declaration::Declaration() = default;
|
||||
Declaration::~Declaration() = default;
|
||||
|
||||
StyleFunctionRule::StyleFunctionRule(String name)
|
||||
: m_name(move(name))
|
||||
{
|
||||
}
|
||||
|
||||
StyleFunctionRule::StyleFunctionRule(String name, Vector<Parser::ComponentValue>&& values)
|
||||
: m_name(move(name))
|
||||
, m_values(move(values))
|
||||
{
|
||||
}
|
||||
StyleFunctionRule::~StyleFunctionRule() = default;
|
||||
|
||||
template<class SeparatorType, class CollectionType>
|
||||
void append_with_to_string(StringBuilder& builder, SeparatorType& separator, CollectionType& collection)
|
||||
{
|
||||
|
@ -123,16 +111,4 @@ String Declaration::to_string() const
|
|||
|
||||
return builder.to_string();
|
||||
}
|
||||
|
||||
String StyleFunctionRule::to_string() const
|
||||
{
|
||||
StringBuilder builder;
|
||||
|
||||
serialize_an_identifier(builder, m_name);
|
||||
builder.append("(");
|
||||
append_with_to_string(builder, " ", m_values);
|
||||
builder.append(")");
|
||||
|
||||
return builder.to_string();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue