mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:28:11 +00:00
LibWeb: Use parse_a_list_of_rules() for @media
and @supports
From the spec: > "Parse a list of rules" is intended for the content of at-rules such > as @media. It differs from "Parse a stylesheet" in the handling of > <CDO-token> and <CDC-token>. - https://www.w3.org/TR/css-syntax-3/#ref-for-parse-a-list-of-rules
This commit is contained in:
parent
7a225a380c
commit
12a787ef8a
2 changed files with 3 additions and 3 deletions
|
@ -2134,7 +2134,7 @@ RefPtr<CSSRule> Parser::convert_to_rule(NonnullRefPtr<StyleRule> rule)
|
|||
return {};
|
||||
|
||||
auto child_tokens = TokenStream { rule->block()->values() };
|
||||
auto parser_rules = consume_a_list_of_rules(child_tokens, TopLevel::No);
|
||||
auto parser_rules = parse_a_list_of_rules(child_tokens);
|
||||
NonnullRefPtrVector<CSSRule> child_rules;
|
||||
for (auto& raw_rule : parser_rules) {
|
||||
if (auto child_rule = convert_to_rule(raw_rule))
|
||||
|
@ -2158,7 +2158,7 @@ RefPtr<CSSRule> Parser::convert_to_rule(NonnullRefPtr<StyleRule> rule)
|
|||
if (!rule->block())
|
||||
return {};
|
||||
auto child_tokens = TokenStream { rule->block()->values() };
|
||||
auto parser_rules = consume_a_list_of_rules(child_tokens, TopLevel::No);
|
||||
auto parser_rules = parse_a_list_of_rules(child_tokens);
|
||||
NonnullRefPtrVector<CSSRule> child_rules;
|
||||
for (auto& raw_rule : parser_rules) {
|
||||
if (auto child_rule = convert_to_rule(raw_rule))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue