aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmlinputelement.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/htmlinputelement.rs')
-rw-r--r--components/script/dom/htmlinputelement.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/components/script/dom/htmlinputelement.rs b/components/script/dom/htmlinputelement.rs
index 17768a76c8b..1378e6ecd76 100644
--- a/components/script/dom/htmlinputelement.rs
+++ b/components/script/dom/htmlinputelement.rs
@@ -242,10 +242,8 @@ impl<'a> HTMLInputElementMethods for JSRef<'a, HTMLInputElement> {
make_bool_setter!(SetReadOnly, "readonly");
// https://html.spec.whatwg.org/multipage/#dom-input-size
- make_uint_getter!(Size);
-
- // https://html.spec.whatwg.org/multipage/#dom-input-size
- make_uint_setter!(SetSize, "size");
+ make_uint_getter!(Size, "size", DEFAULT_INPUT_SIZE);
+ make_limited_uint_setter!(SetSize, "size", DEFAULT_INPUT_SIZE);
// https://html.spec.whatwg.org/multipage/#dom-input-type
make_enumerated_getter!(Type, "text", ("hidden") | ("search") | ("tel") |
@@ -568,7 +566,7 @@ impl<'a> VirtualMethods for JSRef<'a, HTMLInputElement> {
fn parse_plain_attribute(&self, name: &Atom, value: DOMString) -> AttrValue {
match name {
- &atom!("size") => AttrValue::from_u32(value, DEFAULT_INPUT_SIZE),
+ &atom!("size") => AttrValue::from_limited_u32(value, DEFAULT_INPUT_SIZE),
_ => self.super_type().unwrap().parse_plain_attribute(name, value),
}
}