Skip to content
Permalink
Browse files

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 -->
  • Loading branch information...
bors-servo committed Mar 20, 2019
2 parents 681c0eb + 948e169 commit 056cb6ab24919a2568b5577eacd5ff5acd405c9b
@@ -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);
};

This file was deleted.

This file was deleted.

@@ -1,13 +1,3 @@
[insertRule-namespace-no-index.html]
[inserRule with namespace and omitted index argument]
expected: FAIL

[inserRule with namespace and omitted index argument should insert import]
expected: FAIL

[insertRule with namespace and omitted index argument]
expected: FAIL

[insertRule with namespace and omitted index argument should insert import]
expected: FAIL
expected: CRASH

This file was deleted.

@@ -243,9 +243,6 @@
[MediaList interface: calling deleteMedium(CSSOMString) on style_element.sheet.media with too few arguments must throw TypeError]
expected: FAIL
[CSSStyleSheet interface: operation insertRule(CSSOMString, unsigned long)]
expected: FAIL
[CSSStyleSheet interface: style_element.sheet must inherit property "ownerRule" with the proper type]
expected: FAIL

0 comments on commit 056cb6a

Please sign in to comment.
You can’t perform that action at this time.