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

LibWeb: Break friendship between CSS StyleRule and Parser

As before, this requires deviating from the spec slightly to create the
StyleRule fully-formed instead of creating it empty and then modifying
its internals.
This commit is contained in:
Sam Atkins 2022-04-12 17:03:14 +01:00 committed by Andreas Kling
parent 4bdfc2bb32
commit cf24dc2e0c
3 changed files with 36 additions and 21 deletions

View file

@ -10,10 +10,14 @@
namespace Web::CSS::Parser {
StyleRule::StyleRule(StyleRule::Type type)
StyleRule::StyleRule(StyleRule::Type type, FlyString name, Vector<ComponentValue> prelude, RefPtr<Block> block)
: m_type(type)
, m_at_rule_name(move(name))
, m_prelude(move(prelude))
, m_block(move(block))
{
}
StyleRule::~StyleRule() = default;
String StyleRule::to_string() const