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:
Sam Atkins 2025-04-14 17:27:00 +01:00
commit 658569b533
Notes: github-actions[bot] 2025-04-23 10:39:55 +00:00
7 changed files with 32 additions and 15 deletions

View file

@ -2,8 +2,8 @@ Harness status: OK
Found 12 tests
7 Pass
5 Fail
8 Pass
4 Fail
Fail Trailing declarations
Fail Mixed declarations
Fail CSSNestedDeclarations.style
@ -12,7 +12,7 @@ Pass Nested @scope rule
Fail Inner rule starting with an ident
Pass Inserting a CSSNestedDeclaration rule into style rule
Pass Inserting a CSSNestedDeclaration rule into nested group rule
Fail Attempting to insert a CSSNestedDeclaration rule into top-level @media rule
Pass Attempting to insert a CSSNestedDeclaration rule into top-level @media rule
Pass Attempting to insert a CSSNestedDeclaration rule into a stylesheet
Pass Attempting to insert a CSSNestedDeclaration rule, empty block
Pass Attempting to insert a CSSNestedDeclaration rule, all invalid declarations