Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / core / html / HTMLSelectElement.idl
index b61f512..1ad7706 100644 (file)
@@ -19,6 +19,8 @@
  * Boston, MA 02110-1301, USA.
  */
 
+// http://www.whatwg.org/specs/web-apps/current-work/multipage/the-button-element.html#htmlselectelement
+
 interface HTMLSelectElement : HTMLElement {
     [Reflect] attribute boolean autofocus;
     [Reflect] attribute boolean disabled;
@@ -33,23 +35,25 @@ interface HTMLSelectElement : HTMLElement {
     readonly attribute HTMLOptionsCollection options;
     [RaisesException=Setter] attribute unsigned long length;
 
-    getter Node item(unsigned long index);
-    [ImplementedAs=anonymousIndexedSetter, RaisesException] setter HTMLOptionElement (unsigned long index, [TreatNullAs=anonymousIndexedSetterRemove, TreatUndefinedAs=anonymousIndexedSetterRemove] HTMLOptionElement value);
-    Node namedItem([Default=Undefined] optional DOMString name);
-     [RaisesException] void add([Default=Undefined] optional HTMLElement element,
-                            [Default=Undefined] optional HTMLElement before);
+    getter Element item(unsigned long index);
+    Element namedItem([Default=Undefined] optional DOMString name);
+    // FIXME: should be union type http://crbug.com/240176
+    [RaisesException, TypeChecking=Interface] void add(HTMLElement element, optional HTMLElement? before = null);
+    [ImplementedAs=addBeforeOptionAtIndex, RaisesException, TypeChecking=Interface] void add(HTMLElement element, long before);
+    [RaisesException] void remove(); // ChildNode overload
     void remove(long index);
-    void remove(HTMLOptionElement option); // Non standard.
-    [RaisesException] void remove();
+    [RaisesException, TypeChecking=Interface] setter HTMLOptionElement (unsigned long index, HTMLOptionElement? value);
+
     readonly attribute HTMLCollection selectedOptions;
-    attribute long selectedIndex;
-    attribute DOMString value;
+             attribute long selectedIndex;
+             attribute DOMString value;
 
     readonly attribute boolean willValidate;
     readonly attribute ValidityState validity;
     readonly attribute DOMString validationMessage;
     boolean checkValidity();
-    void setCustomValidity([TreatNullAs=NullString, TreatUndefinedAs=NullString] DOMString error);
+    boolean reportValidity();
+    void setCustomValidity([TreatUndefinedAs=NullString] DOMString? error);
 
     readonly attribute NodeList labels;
 };