LibWeb: Add & when setting nested style rule's selector text

When we first parse a nested CSSStyleRule's selectors, we treat them as
relative selectors and then patch them up with an `&` as needed.
However, we weren't doing this when assigning the `cssText` attribute.
So, let's do that!

This gives us a couple of subtest passes. :^)
This commit is contained in:
Sam Atkins 2024-11-08 17:50:38 +00:00 committed by Andreas Kling
commit a0403ac427
Notes: github-actions[bot] 2024-11-09 13:30:38 +00:00
9 changed files with 77 additions and 46 deletions

View file

@ -6,7 +6,8 @@ Rerun
Found 11 tests
11 Fail
1 Pass
10 Fail
Details
Result Test Name MessageFail Trailing declarations apply after any preceding rules
Fail Trailing declarations apply after any preceding rules (no leading)
@ -18,4 +19,4 @@ Fail Bare declartaion in nested grouping rule can match pseudo-element
Fail Nested group rules have top-level specificity behavior
Fail Nested @scope rules behave like :where(:scope)
Fail Nested @scope rules behave like :where(:scope) (trailing)
Fail Nested declarations rule responds to parent selector text change
Pass Nested declarations rule responds to parent selector text change

View file

@ -6,6 +6,6 @@ Rerun
Found 1 tests
1 Fail
1 Pass
Details
Result Test Name MessageFail Nested rule responds to parent selector text change
Result Test Name MessagePass Nested rule responds to parent selector text change