LibWeb/CSS: Process style properties from CSSNestedDeclarations rules

These are created when a style rule has properties listed after another
rule. For example:

```css

.test {
  --a: 1;
  --b: 1;
  --c: 1;

  .thing {
    /* ... */
  }

  /* These are after a rule (.thing) so they're wrapped in a
     CSSNestedDeclarations: */
  --d: 1;
  --e: 1;
  --f: 1;
}
```

They're treated like a nested style rule with the exact same selectors
as their containing style rule.
This commit is contained in:
Sam Atkins 2024-10-17 13:48:00 +01:00 committed by Andreas Kling
commit e4245dc39e
Notes: github-actions[bot] 2024-10-17 18:57:04 +00:00
6 changed files with 78 additions and 17 deletions

View file

@ -57,7 +57,7 @@ public:
WebIDL::ExceptionOr<void> replace_sync(StringView text);
void for_each_effective_rule(TraversalOrder, Function<void(CSSRule const&)> const& callback) const;
void for_each_effective_style_rule(Function<void(CSSStyleRule const&)> const& callback) const;
void for_each_effective_style_producing_rule(Function<void(CSSRule const&)> const& callback) const;
// Returns whether the match state of any media queries changed after evaluation.
bool evaluate_media_queries(HTML::Window const&);
void for_each_effective_keyframes_at_rule(Function<void(CSSKeyframesRule const&)> const& callback) const;