1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 15:38:10 +00:00

LibWeb: Convert some CSS parser *Rule classes to using pointers

Previously these were all passed around by value, but some of them
(StyleComponentValueRule and StyleBlockRule) want to include each
other as fields, so this had to change.
This commit is contained in:
Sam Atkins 2021-07-01 14:13:48 +01:00 committed by Andreas Kling
parent a558916e1f
commit 89bfde29dc
7 changed files with 47 additions and 29 deletions

View file

@ -7,6 +7,7 @@
#pragma once
#include <AK/RefCounted.h>
#include <AK/String.h>
#include <AK/Vector.h>
@ -14,11 +15,11 @@ namespace Web::CSS {
class StyleComponentValueRule;
class StyleFunctionRule {
class StyleFunctionRule : public RefCounted<StyleFunctionRule> {
friend class Parser;
public:
StyleFunctionRule();
StyleFunctionRule(String name);
~StyleFunctionRule();
String const& name() const { return m_name; }
@ -38,5 +39,4 @@ private:
String m_name;
Vector<String> m_values;
};
}