Bug 635499 (1/2) - Add the max attribute to HTMLInputElement. r=sicking

--HG--
extra : rebase_source : 4244148c48e837750bb12d809596d8ec18155f73
This commit is contained in:
Mounir Lamouri 2012-07-05 12:11:31 +02:00
parent e1126739b0
commit 3af7244f4b
3 changed files with 7 additions and 2 deletions

View File

@ -838,6 +838,7 @@ NS_IMPL_ENUM_ATTR_DEFAULT_VALUE(nsHTMLInputElement, Autocomplete, autocomplete,
NS_IMPL_BOOL_ATTR(nsHTMLInputElement, Autofocus, autofocus) NS_IMPL_BOOL_ATTR(nsHTMLInputElement, Autofocus, autofocus)
//NS_IMPL_BOOL_ATTR(nsHTMLInputElement, Checked, checked) //NS_IMPL_BOOL_ATTR(nsHTMLInputElement, Checked, checked)
NS_IMPL_BOOL_ATTR(nsHTMLInputElement, Disabled, disabled) NS_IMPL_BOOL_ATTR(nsHTMLInputElement, Disabled, disabled)
NS_IMPL_STRING_ATTR(nsHTMLInputElement, Max, max)
NS_IMPL_ACTION_ATTR(nsHTMLInputElement, FormAction, formaction) NS_IMPL_ACTION_ATTR(nsHTMLInputElement, FormAction, formaction)
NS_IMPL_ENUM_ATTR_DEFAULT_VALUE(nsHTMLInputElement, FormEnctype, formenctype, NS_IMPL_ENUM_ATTR_DEFAULT_VALUE(nsHTMLInputElement, FormEnctype, formenctype,
kFormDefaultEnctype->tag) kFormDefaultEnctype->tag)

View File

@ -111,7 +111,10 @@ reflectUnsignedInt({
// TODO: list (HTMLElement) // TODO: list (HTMLElement)
// .max // .max
todo("max" in document.createElement("input"), "max isn't implemented yet"); reflectString({
element: document.createElement('input'),
attribute: 'max',
});
// .maxLength // .maxLength
reflectInt({ reflectInt({

View File

@ -20,7 +20,7 @@ interface nsIDOMValidityState;
* http://www.whatwg.org/specs/web-apps/current-work/ * http://www.whatwg.org/specs/web-apps/current-work/
*/ */
[scriptable, uuid(ac2e2b14-b987-452c-a071-5823b2406b85)] [scriptable, uuid(23d5399b-004e-469b-a735-d89009ffe9a6)]
interface nsIDOMHTMLInputElement : nsIDOMHTMLElement interface nsIDOMHTMLInputElement : nsIDOMHTMLElement
{ {
attribute DOMString accept; attribute DOMString accept;
@ -44,6 +44,7 @@ interface nsIDOMHTMLInputElement : nsIDOMHTMLElement
attribute boolean indeterminate; attribute boolean indeterminate;
readonly attribute nsIDOMHTMLElement list; readonly attribute nsIDOMHTMLElement list;
attribute DOMString max;
attribute long maxLength; attribute long maxLength;
attribute boolean multiple; attribute boolean multiple;