diff options
author | Anthony Ramine <n.oxyde@gmail.com> | 2015-08-27 22:15:54 +0200 |
---|---|---|
committer | Anthony Ramine <n.oxyde@gmail.com> | 2015-08-27 22:27:43 +0200 |
commit | 709d347872e37ab2358e057d24557b9977238ecd (patch) | |
tree | 89f726bf207325eea8a8ca316f6d77d8c88432cb /components/script/dom/htmloptionelement.rs | |
parent | 856fda7f2e3fe4abd6de247e8bdaf8cedf3764c2 (diff) | |
download | servo-709d347872e37ab2358e057d24557b9977238ecd.tar.gz servo-709d347872e37ab2358e057d24557b9977238ecd.zip |
Make the traits for the IDL interfaces take &self
Diffstat (limited to 'components/script/dom/htmloptionelement.rs')
-rw-r--r-- | components/script/dom/htmloptionelement.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/components/script/dom/htmloptionelement.rs b/components/script/dom/htmloptionelement.rs index daf19217738..f830cc61cc1 100644 --- a/components/script/dom/htmloptionelement.rs +++ b/components/script/dom/htmloptionelement.rs @@ -70,18 +70,18 @@ fn collect_text(node: &&Node, value: &mut DOMString) { } } -impl<'a> HTMLOptionElementMethods for &'a HTMLOptionElement { +impl HTMLOptionElementMethods for HTMLOptionElement { // https://www.whatwg.org/html/#dom-option-disabled make_bool_getter!(Disabled); // https://www.whatwg.org/html/#dom-option-disabled - fn SetDisabled(self, disabled: bool) { + fn SetDisabled(&self, disabled: bool) { let elem = ElementCast::from_ref(self); elem.set_bool_attribute(&atom!("disabled"), disabled) } // https://www.whatwg.org/html/#dom-option-text - fn Text(self) -> DOMString { + fn Text(&self) -> DOMString { let node = NodeCast::from_ref(self); let mut content = String::new(); collect_text(&node, &mut content); @@ -90,13 +90,13 @@ impl<'a> HTMLOptionElementMethods for &'a HTMLOptionElement { } // https://www.whatwg.org/html/#dom-option-text - fn SetText(self, value: DOMString) { + fn SetText(&self, value: DOMString) { let node = NodeCast::from_ref(self); node.SetTextContent(Some(value)) } // https://html.spec.whatwg.org/multipage/#attr-option-value - fn Value(self) -> DOMString { + fn Value(&self) -> DOMString { let element = ElementCast::from_ref(self); let attr = &atom!("value"); if element.has_attribute(attr) { @@ -110,7 +110,7 @@ impl<'a> HTMLOptionElementMethods for &'a HTMLOptionElement { make_setter!(SetValue, "value"); // https://html.spec.whatwg.org/multipage/#attr-option-label - fn Label(self) -> DOMString { + fn Label(&self) -> DOMString { let element = ElementCast::from_ref(self); let attr = &atom!("label"); if element.has_attribute(attr) { |