Auto merge of #25413 - pshaughn:optionindex, r=jdm

Implement HTMLOptionElement.index

<!-- Please describe your changes on the following line: -->
Made list_of_options public in HTMLSelectElement so HTMLOptionElement can see it, added index-getting to HTMLOptionElement.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #25392

<!-- Either: -->
- [X] There are tests for these changes OR

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
This commit is contained in:
bors-servo 2020-01-10 17:14:00 -05:00 committed by GitHub
commit 6b79a8f042
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 43 additions and 25 deletions

View file

@ -2337,9 +2337,6 @@
[HTMLInputElement interface: createInput("url") must inherit property "stepDown(long)" with the proper type]
expected: FAIL
[HTMLOptionElement interface: new Option() must inherit property "index" with the proper type]
expected: FAIL
[HTMLInputElement interface: createInput("password") must inherit property "height" with the proper type]
expected: FAIL
@ -3702,9 +3699,6 @@
[HTMLInputElement interface: calling setCustomValidity(DOMString) on createInput("range") with too few arguments must throw TypeError]
expected: FAIL
[HTMLOptionElement interface: attribute index]
expected: FAIL
[HTMLInputElement interface: document.createElement("input") must inherit property "valueAsNumber" with the proper type]
expected: FAIL
@ -4923,9 +4917,6 @@
[HTMLInputElement interface: createInput("number") must inherit property "valueAsDate" with the proper type]
expected: FAIL
[HTMLOptionElement interface: document.createElement("option") must inherit property "index" with the proper type]
expected: FAIL
[HTMLInputElement interface: createInput("email") must inherit property "setCustomValidity(DOMString)" with the proper type]
expected: FAIL

View file

@ -1,14 +0,0 @@
[option-index.html]
type: testharness
[option index should work inside the document]
expected: FAIL
[option index should always be 0 for options in datalists]
expected: FAIL
[option index should always be 0 for options with no container]
expected: FAIL
[option index should always be 0 for options not even in the document]
expected: FAIL