1/* 2 * Copyright (C) 2006, 2010 Apple Inc. All rights reserved. 3 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> 4 * 5 * This library is free software; you can redistribute it and/or 6 * modify it under the terms of the GNU Library General Public 7 * License as published by the Free Software Foundation; either 8 * version 2 of the License, or (at your option) any later version. 9 * 10 * This library is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 * Library General Public License for more details. 14 * 15 * You should have received a copy of the GNU Library General Public License 16 * along with this library; see the file COPYING.LIB. If not, write to 17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 18 * Boston, MA 02110-1301, USA. 19 */ 20 21module html { 22 23 interface HTMLInputElement : HTMLElement { 24 attribute [ConvertNullToNullString] DOMString defaultValue; 25 attribute [Reflect=checked] boolean defaultChecked; 26 readonly attribute HTMLFormElement form; 27 attribute [Reflect, URL] DOMString formAction; 28 attribute [Reflect] DOMString formEnctype; 29 attribute [Reflect] DOMString formMethod; 30 attribute [Reflect] boolean formNoValidate; 31 attribute [Reflect] DOMString formTarget; 32 readonly attribute ValidityState validity; 33 attribute [Reflect] DOMString accept; 34 attribute [Reflect] DOMString accessKey; 35 attribute [Reflect] DOMString align; 36 attribute [Reflect] DOMString alt; 37 attribute boolean checked; 38 attribute [Reflect] boolean disabled; 39 attribute [Reflect] boolean autofocus; 40#if defined(ENABLE_DATALIST) && ENABLE_DATALIST 41 readonly attribute HTMLElement list; 42#endif 43 attribute [Reflect] DOMString max; 44 attribute long maxLength setter raises(DOMException); 45 attribute [Reflect] DOMString min; 46 attribute [Reflect] boolean multiple; 47#if defined(ENABLE_DIRECTORY_UPLOAD) && ENABLE_DIRECTORY_UPLOAD 48 attribute [Reflect] boolean webkitdirectory; 49#endif 50 attribute [Reflect] DOMString name; 51 attribute [Reflect] DOMString pattern; 52 attribute [Reflect] DOMString placeholder; 53 attribute [Reflect] boolean readOnly; 54 attribute [Reflect] boolean required; 55#if defined(LANGUAGE_OBJECTIVE_C) && LANGUAGE_OBJECTIVE_C 56 attribute [ConvertToString] DOMString size; // DOM level 2 changed this to a long, but our existing API is a string 57#else 58 // FIXME: The spec says this should be a long, not an unsigned long. 59 attribute unsigned long size; // Changed string -> long as part of DOM level 2 60#endif 61 attribute [Reflect, URL] DOMString src; 62 attribute [Reflect] DOMString step; 63 attribute [ConvertNullToNullString] DOMString type; // readonly dropped as part of DOM level 2 64 attribute [Reflect] DOMString useMap; 65 attribute [ConvertNullToNullString] DOMString value; 66#if !defined(LANGUAGE_CPP) || !LANGUAGE_CPP 67 attribute Date valueAsDate setter raises(DOMException); 68#endif 69 attribute double valueAsNumber setter raises(DOMException); 70#if defined(ENABLE_DATALIST) && ENABLE_DATALIST 71 readonly attribute HTMLOptionElement selectedOption; 72#endif 73 attribute [Reflect] boolean incremental; 74 75 void stepUp(in [Optional] long n) raises(DOMException); 76 void stepDown(in [Optional] long n) raises(DOMException); 77 78 readonly attribute boolean willValidate; 79 readonly attribute DOMString validationMessage; 80 boolean checkValidity(); 81 void setCustomValidity(in [ConvertUndefinedOrNullToNullString] DOMString error); 82 void select(); 83 void click(); 84 85#if !defined(LANGUAGE_JAVASCRIPT) || !LANGUAGE_JAVASCRIPT 86 void setValueForUser(in [ConvertNullToNullString] DOMString value); 87#endif 88 89 // WinIE extension: 90 attribute boolean indeterminate; 91 92 attribute [Custom] long selectionStart; 93 attribute [Custom] long selectionEnd; 94 [Custom] void setSelectionRange(in long start, in long end); 95 96#if defined(LANGUAGE_OBJECTIVE_C) 97 // Objective-C extension: 98 readonly attribute DOMString altDisplayString; 99 readonly attribute URL absoluteImageURL; 100#endif 101 102 readonly attribute FileList files; 103 readonly attribute NodeList labels; 104 105#if defined(ENABLE_INPUT_SPEECH) && ENABLE_INPUT_SPEECH 106 attribute [Reflect, EnabledAtRuntime] boolean webkitSpeech; 107 attribute [Reflect, EnabledAtRuntime] boolean webkitGrammar; 108 attribute [DontEnum] EventListener onwebkitspeechchange; 109#endif 110#if defined(WTF_PLATFORM_ANDROID) && defined(ENABLE_MEDIA_CAPTURE) && ENABLE_MEDIA_CAPTURE 111 attribute [Reflect] DOMString capture; 112#endif 113 }; 114 115} 116