mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 06:18:12 +00:00
LibWeb: Break friendship between CSS Function and Parser
Again, this means deviating from the spec by creating a complete Function in one go instead of creating it empty and then poking at its internals.
This commit is contained in:
parent
7d67e428a6
commit
d67e817d8e
4 changed files with 14 additions and 14 deletions
|
@ -17,11 +17,12 @@
|
|||
namespace Web::CSS::Parser {
|
||||
|
||||
class Function : public RefCounted<Function> {
|
||||
friend class Parser;
|
||||
|
||||
public:
|
||||
explicit Function(FlyString name);
|
||||
Function(FlyString name, Vector<ComponentValue>&& values);
|
||||
static NonnullRefPtr<Function> create(FlyString name, Vector<ComponentValue>&& values)
|
||||
{
|
||||
return adopt_ref(*new Function(move(name), move(values)));
|
||||
}
|
||||
|
||||
~Function();
|
||||
|
||||
StringView name() const { return m_name; }
|
||||
|
@ -30,6 +31,8 @@ public:
|
|||
String to_string() const;
|
||||
|
||||
private:
|
||||
Function(FlyString name, Vector<ComponentValue>&& values);
|
||||
|
||||
FlyString m_name;
|
||||
Vector<ComponentValue> m_values;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue