aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmlinputelement.rs
diff options
context:
space:
mode:
authorbors-servo <metajack+bors@gmail.com>2015-05-06 14:22:45 -0500
committerbors-servo <metajack+bors@gmail.com>2015-05-06 14:22:45 -0500
commit19744984da58feeeab64a98839ec2936fb8fb5a0 (patch)
treed7951916e1f895dea638758445f54cffa136b4bf /components/script/dom/htmlinputelement.rs
parentccf1e6b9a701cf4ff010fa1f1b4ba9d656d962af (diff)
parentfedad2af1f7c8b36f4ed76e79ebde5516721b11f (diff)
downloadservo-19744984da58feeeab64a98839ec2936fb8fb5a0.tar.gz
servo-19744984da58feeeab64a98839ec2936fb8fb5a0.zip
Auto merge of #5923 - nox:limited-unsigned-long, r=jdm
<!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5923) <!-- Reviewable:end -->
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),
}
}