Don't require index parameter in CSSGroupingRule's insertRule() (#35295)

Make it optional, defaulting to 0 if omitted, as defined in the spec:
https://drafts.csswg.org/cssom/#ref-for-dom-cssgroupingrule-insertrule

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
Oriol Brufau 2025-02-05 13:41:36 +01:00 committed by GitHub
parent 07aa4ce093
commit 7b36f2beb3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 1 additions and 8 deletions

View file

@ -6,7 +6,7 @@
[Abstract, Exposed=Window]
interface CSSGroupingRule : CSSRule {
[SameObject] readonly attribute CSSRuleList cssRules;
[Throws] unsigned long insertRule(DOMString rule, unsigned long index);
[Throws] unsigned long insertRule(DOMString rule, optional unsigned long index = 0);
[Throws] undefined deleteRule(unsigned long index);
};

View file

@ -1,4 +0,0 @@
[CSSGroupingRule-insertRule.html]
[index not specified]
expected: FAIL

View file

@ -215,9 +215,6 @@
[CSSRule interface: sheet.cssRules[2\].cssRules[0\] must inherit property "MARGIN_RULE" with the proper type]
expected: FAIL
[CSSGroupingRule interface: operation insertRule(CSSOMString, optional unsigned long)]
expected: FAIL
[CSSImportRule interface: sheet.cssRules[0\] must inherit property "styleSheet" with the proper type]
expected: FAIL