aboutsummaryrefslogtreecommitdiffstats
path: root/components/script_bindings
diff options
context:
space:
mode:
authorOriol Brufau <obrufau@igalia.com>2025-04-01 12:18:07 -0700
committerGitHub <noreply@github.com>2025-04-01 19:18:07 +0000
commit0cdc1dcf7216626243d62131aaafffe518ff440f (patch)
tree8197b1c40816e4f3e921f03933ea3539ddce97ce /components/script_bindings
parentdba8a0c22c18e6d8914e864d0324340acf7eef86 (diff)
downloadservo-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.webidl2
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;
};