diff options
author | Oriol Brufau <obrufau@igalia.com> | 2025-04-01 12:18:07 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-01 19:18:07 +0000 |
commit | 0cdc1dcf7216626243d62131aaafffe518ff440f (patch) | |
tree | 8197b1c40816e4f3e921f03933ea3539ddce97ce /components/script_bindings | |
parent | dba8a0c22c18e6d8914e864d0324340acf7eef86 (diff) | |
download | servo-0cdc1dcf7216626243d62131aaafffe518ff440f.tar.gz servo-0cdc1dcf7216626243d62131aaafffe518ff440f.zip |
Turn `CSSStyleRule` into a `CSSGroupingRule` subclass (#36254)
Note that `StyleRule` may not have the `CssRules` readily available,
they may need to be created. So the previous approach of providing
`CSSGroupingRule` with the `CssRules` is no good: it would require
writing them in advance, just in case they end up being used.
Therefore, this removes the `CSSGroupingRule::rules` field. Instead,
they are lazily obtained in `CSSGroupingRule::rulelist()` by downcasting
and calling the appropriate method for the subclass.
Testing: covered by WPT
Fixes: #36245
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Diffstat (limited to 'components/script_bindings')
-rw-r--r-- | components/script_bindings/webidls/CSSStyleRule.webidl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/components/script_bindings/webidls/CSSStyleRule.webidl b/components/script_bindings/webidls/CSSStyleRule.webidl index 48bf819bb89..b9211c9f283 100644 --- a/components/script_bindings/webidls/CSSStyleRule.webidl +++ b/components/script_bindings/webidls/CSSStyleRule.webidl @@ -4,7 +4,7 @@ // https://drafts.csswg.org/cssom/#the-cssstylerule-interface [Exposed=Window] -interface CSSStyleRule : CSSRule { +interface CSSStyleRule : CSSGroupingRule { attribute DOMString selectorText; [SameObject, PutForwards=cssText] readonly attribute CSSStyleDeclaration style; }; |