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

LibWeb: Convert StyleFunctionRule.m_values to ComponentValues

The input is ComponentValues, and the output is too, so storing as
a String in the middle was inefficient and unnecessary.
This commit is contained in:
Sam Atkins 2021-07-08 12:33:49 +01:00 committed by Andreas Kling
parent fabc09a593
commit cf333574ac
3 changed files with 17 additions and 12 deletions

View file

@ -23,20 +23,17 @@ public:
~StyleFunctionRule();
String const& name() const { return m_name; }
Vector<String> const& values() const { return m_values; }
Vector<StyleComponentValueRule> const& values() const { return m_values; }
// FIXME: This method is a temporary hack while much of the parser still expects a string, rather than tokens.
String values_as_string() const
{
StringBuilder builder;
for (auto& value : m_values)
builder.append(value);
return builder.to_string();
return "";
}
String to_string() const;
private:
String m_name;
Vector<String> m_values;
Vector<StyleComponentValueRule> m_values;
};
}