Auto merge of #9407 - KiChjang:radio-node-list, r=nox

Implement RadioNodeList

I also had to implement the NamedGetter for HTMLFormControlsCollection as well, since that's the only consumer of RadioNodeList and I wanted to see which wpt test passes.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9407)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-01-29 14:04:16 +05:30
commit 0c5591a8ec
12 changed files with 178 additions and 60 deletions

View file

@ -6,11 +6,5 @@
// https://html.spec.whatwg.org/multipage/#htmlformcontrolscollection
interface HTMLFormControlsCollection : HTMLCollection {
// inherits length and item()
// getter (RadioNodeList or Element)? namedItem(DOMString name); // shadows inherited namedItem()
getter (RadioNodeList or Element)? namedItem(DOMString name); // shadows inherited namedItem()
};
/*
interface RadioNodeList : NodeList {
attribute DOMString value;
};
*/

View file

@ -8,8 +8,9 @@
*/
interface NodeList {
[Pure]
readonly attribute unsigned long length;
[Pure]
getter Node? item(unsigned long index);
[Pure]
readonly attribute unsigned long length;
// iterable<Node>;
};

View file

@ -0,0 +1,9 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#radionodelist
interface RadioNodeList : NodeList {
attribute DOMString value;
};