Auto merge of #23029 - KwanEsq:insertRuleNoIndex, r=SimonSapin

Update StyleSheet.insertRule WebIDL to make index optional.

Update wpt metadata to show the new passes.
Add one test as crashing since currently passing an \@import rule to insertRule
leads to "Expected a stylesheet loader for \@import"

---

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #23025
- [x] There are tests for these changes
- [x] ./mach test-wpt css/cssom passes with these changes

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23029)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2019-03-20 13:04:13 -04:00 committed by GitHub
commit 43cc2a0224
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 2 additions and 42 deletions

View file

@ -7,6 +7,6 @@
interface CSSStyleSheet : StyleSheet {
// readonly attribute CSSRule? ownerRule;
[Throws, 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] void deleteRule(unsigned long index);
};