mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-16 05:51:55 +00:00
LibWeb/CSS: Return GC::Ref from Parser::convert_to_style_declaration()
This commit is contained in:
parent
a28197669a
commit
9b06f66571
Notes:
github-actions[bot]
2025-03-19 13:54:06 +00:00
Author: https://github.com/AtkinsSJ
Commit: 9b06f66571
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3983
4 changed files with 7 additions and 31 deletions
|
@ -505,12 +505,7 @@ GC::Ptr<CSSMediaRule> Parser::convert_to_media_rule(AtRule const& rule, Nested n
|
|||
child_rules.append(child_rule);
|
||||
},
|
||||
[&](Vector<Declaration> const& declarations) {
|
||||
auto* declaration = convert_to_style_declaration(declarations);
|
||||
if (!declaration) {
|
||||
dbgln_if(CSS_PARSER_DEBUG, "CSSParser: nested declarations invalid; discarding.");
|
||||
return;
|
||||
}
|
||||
child_rules.append(CSSNestedDeclarations::create(realm(), *declaration));
|
||||
child_rules.append(CSSNestedDeclarations::create(realm(), *convert_to_style_declaration(declarations)));
|
||||
});
|
||||
}
|
||||
auto rule_list = CSSRuleList::create(realm(), child_rules);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue