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.rs49
1 files changed, 25 insertions, 24 deletions
diff --git a/components/script/dom/htmlinputelement.rs b/components/script/dom/htmlinputelement.rs
index dbc0d4f8f1f..8977d45048e 100644
--- a/components/script/dom/htmlinputelement.rs
+++ b/components/script/dom/htmlinputelement.rs
@@ -271,22 +271,22 @@ impl LayoutHTMLInputElementHelpers for LayoutJS<HTMLInputElement> {
impl HTMLInputElementMethods for HTMLInputElement {
- // https://html.spec.whatwg.org/multipage/#attr-input-accept
+ // https://html.spec.whatwg.org/multipage/#dom-input-accept
make_getter!(Accept, "accept");
- // https://html.spec.whatwg.org/multipage/#attr-input-accept
+ // https://html.spec.whatwg.org/multipage/#dom-input-accept
make_setter!(SetAccept, "accept");
- // https://html.spec.whatwg.org/multipage/#attr-input-alt
+ // https://html.spec.whatwg.org/multipage/#dom-input-alt
make_getter!(Alt, "alt");
- // https://html.spec.whatwg.org/multipage/#attr-input-alt
+ // https://html.spec.whatwg.org/multipage/#dom-input-alt
make_setter!(SetAlt, "alt");
- // https://html.spec.whatwg.org/multipage/#attr-input-dirName
+ // https://html.spec.whatwg.org/multipage/#dom-input-dirName
make_getter!(DirName, "dirname");
- // https://html.spec.whatwg.org/multipage/#attr-input-dirName
+ // https://html.spec.whatwg.org/multipage/#dom-input-dirName
make_setter!(SetDirName, "dirname");
// https://html.spec.whatwg.org/multipage/#dom-fe-disabled
@@ -415,10 +415,10 @@ impl HTMLInputElementMethods for HTMLInputElement {
// https://html.spec.whatwg.org/multipage/#attr-fe-name
make_atomic_setter!(SetName, "name");
- // https://html.spec.whatwg.org/multipage/#attr-input-placeholder
+ // https://html.spec.whatwg.org/multipage/#dom-input-placeholder
make_getter!(Placeholder, "placeholder");
- // https://html.spec.whatwg.org/multipage/#attr-input-placeholder
+ // https://html.spec.whatwg.org/multipage/#dom-input-placeholder
make_setter!(SetPlaceholder, "placeholder");
// https://html.spec.whatwg.org/multipage/#dom-input-formaction
@@ -454,10 +454,10 @@ impl HTMLInputElementMethods for HTMLInputElement {
// https://html.spec.whatwg.org/multipage/#attr-fs-formnovalidate
make_bool_setter!(SetFormNoValidate, "formnovalidate");
- // https://html.spec.whatwg.org/multipage/#attr-input-max
+ // https://html.spec.whatwg.org/multipage/#dom-input-max
make_getter!(Max, "max");
- // https://html.spec.whatwg.org/multipage/#attr-input-max
+ // https://html.spec.whatwg.org/multipage/#dom-input-max
make_setter!(SetMax, "max");
// https://html.spec.whatwg.org/multipage/#dom-input-maxlength
@@ -466,40 +466,40 @@ impl HTMLInputElementMethods for HTMLInputElement {
// https://html.spec.whatwg.org/multipage/#dom-input-maxlength
make_limited_int_setter!(SetMaxLength, "maxlength", DEFAULT_MAX_LENGTH);
- // https://html.spec.whatwg.org/multipage/#attr-input-min
+ // https://html.spec.whatwg.org/multipage/#dom-input-min
make_getter!(Min, "min");
- // https://html.spec.whatwg.org/multipage/#attr-input-min
+ // https://html.spec.whatwg.org/multipage/#dom-input-min
make_setter!(SetMin, "min");
- // https://html.spec.whatwg.org/multipage/#attr-input-multiple
+ // https://html.spec.whatwg.org/multipage/#dom-input-multiple
make_bool_getter!(Multiple, "multiple");
- // https://html.spec.whatwg.org/multipage/#attr-input-multiple
+ // https://html.spec.whatwg.org/multipage/#dom-input-multiple
make_bool_setter!(SetMultiple, "multiple");
- // https://html.spec.whatwg.org/multipage/#attr-input-pattern
+ // https://html.spec.whatwg.org/multipage/#dom-input-pattern
make_getter!(Pattern, "pattern");
- // https://html.spec.whatwg.org/multipage/#attr-input-pattern
+ // https://html.spec.whatwg.org/multipage/#dom-input-pattern
make_setter!(SetPattern, "pattern");
- // https://html.spec.whatwg.org/multipage/#attr-input-required
+ // https://html.spec.whatwg.org/multipage/#dom-input-required
make_bool_getter!(Required, "required");
- // https://html.spec.whatwg.org/multipage/#attr-input-required
+ // https://html.spec.whatwg.org/multipage/#dom-input-required
make_bool_setter!(SetRequired, "required");
- // https://html.spec.whatwg.org/multipage/#attr-input-src
- make_getter!(Src, "src");
+ // https://html.spec.whatwg.org/multipage/#dom-input-src
+ make_url_getter!(Src, "src");
- // https://html.spec.whatwg.org/multipage/#attr-input-src
- make_setter!(SetSrc, "src");
+ // https://html.spec.whatwg.org/multipage/#dom-input-src
+ make_url_setter!(SetSrc, "src");
- // https://html.spec.whatwg.org/multipage/#attr-input-step
+ // https://html.spec.whatwg.org/multipage/#dom-input-step
make_getter!(Step, "step");
- // https://html.spec.whatwg.org/multipage/#attr-input-step
+ // https://html.spec.whatwg.org/multipage/#dom-input-step
make_setter!(SetStep, "step");
// https://html.spec.whatwg.org/multipage/#dom-input-indeterminate
@@ -881,6 +881,7 @@ impl VirtualMethods for HTMLInputElement {
fn parse_plain_attribute(&self, name: &Atom, value: DOMString) -> AttrValue {
match name {
+ &atom!("accept") => AttrValue::from_comma_separated_tokenlist(value.into()),
&atom!("name") => AttrValue::from_atomic(value.into()),
&atom!("size") => AttrValue::from_limited_u32(value.into(), DEFAULT_INPUT_SIZE),
&atom!("type") => AttrValue::from_atomic(value.into()),