aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmltextareaelement.rs
diff options
context:
space:
mode:
authorAnthony Ramine <n.oxyde@gmail.com>2015-08-27 22:15:54 +0200
committerAnthony Ramine <n.oxyde@gmail.com>2015-08-27 22:27:43 +0200
commit709d347872e37ab2358e057d24557b9977238ecd (patch)
tree89f726bf207325eea8a8ca316f6d77d8c88432cb /components/script/dom/htmltextareaelement.rs
parent856fda7f2e3fe4abd6de247e8bdaf8cedf3764c2 (diff)
downloadservo-709d347872e37ab2358e057d24557b9977238ecd.tar.gz
servo-709d347872e37ab2358e057d24557b9977238ecd.zip
Make the traits for the IDL interfaces take &self
Diffstat (limited to 'components/script/dom/htmltextareaelement.rs')
-rw-r--r--components/script/dom/htmltextareaelement.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/components/script/dom/htmltextareaelement.rs b/components/script/dom/htmltextareaelement.rs
index 49c61c7b5b2..cade3dbe712 100644
--- a/components/script/dom/htmltextareaelement.rs
+++ b/components/script/dom/htmltextareaelement.rs
@@ -114,7 +114,7 @@ impl HTMLTextAreaElement {
}
}
-impl<'a> HTMLTextAreaElementMethods for &'a HTMLTextAreaElement {
+impl HTMLTextAreaElementMethods for HTMLTextAreaElement {
// TODO A few of these attributes have default values and additional
// constraints
@@ -163,18 +163,18 @@ impl<'a> HTMLTextAreaElementMethods for &'a HTMLTextAreaElement {
make_setter!(SetWrap, "wrap");
// https://html.spec.whatwg.org/multipage/#dom-textarea-type
- fn Type(self) -> DOMString {
+ fn Type(&self) -> DOMString {
"textarea".to_owned()
}
// https://html.spec.whatwg.org/multipage/#dom-textarea-defaultvalue
- fn DefaultValue(self) -> DOMString {
+ fn DefaultValue(&self) -> DOMString {
let node = NodeCast::from_ref(self);
node.GetTextContent().unwrap()
}
// https://html.spec.whatwg.org/multipage/#dom-textarea-defaultvalue
- fn SetDefaultValue(self, value: DOMString) {
+ fn SetDefaultValue(&self, value: DOMString) {
let node = NodeCast::from_ref(self);
node.SetTextContent(Some(value));
@@ -186,12 +186,12 @@ impl<'a> HTMLTextAreaElementMethods for &'a HTMLTextAreaElement {
}
// https://html.spec.whatwg.org/multipage/#dom-textarea-value
- fn Value(self) -> DOMString {
+ fn Value(&self) -> DOMString {
self.textinput.borrow().get_content()
}
// https://html.spec.whatwg.org/multipage/#dom-textarea-value
- fn SetValue(self, value: DOMString) {
+ fn SetValue(&self, value: DOMString) {
// TODO move the cursor to the end of the field
self.textinput.borrow_mut().set_content(value);
self.value_changed.set(true);