mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-16 05:51:55 +00:00
LibWeb: Distinguish between empty block at-rules and statement at-rules
This commit is contained in:
parent
701fcb9e87
commit
59a2e10a4e
Notes:
github-actions[bot]
2025-06-17 07:59:09 +00:00
Author: https://github.com/tcl3
Commit: 59a2e10a4e
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5111
Reviewed-by: https://github.com/AtkinsSJ ✅
3 changed files with 60 additions and 2 deletions
|
@ -196,7 +196,7 @@ GC::Ptr<CSSImportRule> Parser::convert_to_import_rule(AtRule const& rule)
|
|||
return {};
|
||||
}
|
||||
|
||||
if (!rule.child_rules_and_lists_of_declarations.is_empty()) {
|
||||
if (rule.is_block_rule) {
|
||||
dbgln_if(CSS_PARSER_DEBUG, "Failed to parse @import rule: Block is not allowed.");
|
||||
return {};
|
||||
}
|
||||
|
@ -470,7 +470,7 @@ GC::Ptr<CSSNamespaceRule> Parser::convert_to_namespace_rule(AtRule const& rule)
|
|||
return {};
|
||||
}
|
||||
|
||||
if (!rule.child_rules_and_lists_of_declarations.is_empty()) {
|
||||
if (rule.is_block_rule) {
|
||||
dbgln_if(CSS_PARSER_DEBUG, "Failed to parse @namespace rule: Block is not allowed.");
|
||||
return {};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue