mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-11 03:56:16 +00:00
LibWeb/CSS: Use CSSRule's context to parse new child rules
Keep track of which CSSRule owns a CSSRuleList, and then use that to produce a stack of RuleContexts for the CSS Parser to use. There are certainly other places we should do this!
This commit is contained in:
parent
763b1b0ee2
commit
658569b533
Notes:
github-actions[bot]
2025-04-23 10:39:55 +00:00
Author: https://github.com/AtkinsSJ
Commit: 658569b533
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4354
7 changed files with 32 additions and 15 deletions
|
@ -1360,9 +1360,7 @@ Parser::PropertiesAndCustomProperties Parser::parse_as_property_declaration_bloc
|
|||
};
|
||||
|
||||
// 1. Let declarations be the returned declarations from invoking parse a block’s contents with string.
|
||||
m_rule_context.append(RuleContext::Style);
|
||||
auto declarations_and_at_rules = parse_a_blocks_contents(m_token_stream);
|
||||
m_rule_context.take_last();
|
||||
|
||||
// 2. Let parsed declarations be a new empty list.
|
||||
PropertiesAndCustomProperties parsed_declarations;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue