LibWeb/CSS: Make CSSStyleRule be a CSSGroupingRule

As part of this, we can now fill in the missing serialization steps.

The parsing is a stub for now, and will be filled out in a subsequent
commit.
This commit is contained in:
Sam Atkins 2024-10-08 12:06:53 +01:00 committed by Andreas Kling
commit 7723873016
Notes: github-actions[bot] 2024-10-14 06:09:48 +00:00
5 changed files with 59 additions and 40 deletions

View file

@ -1358,7 +1358,10 @@ JS::GCPtr<CSSRule> Parser::convert_to_rule(NonnullRefPtr<Rule> rule)
return {};
}
return CSSStyleRule::create(m_context.realm(), move(selectors.value()), *declaration);
// TODO: Implement this properly
JS::MarkedVector<CSSRule*> child_rules(m_context.realm().heap());
auto nested_rules = CSSRuleList::create(m_context.realm(), move(child_rules));
return CSSStyleRule::create(m_context.realm(), move(selectors.value()), *declaration, *nested_rules);
}
JS::GCPtr<CSSImportRule> Parser::convert_to_import_rule(Rule& rule)