aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmlelement.rs
diff options
context:
space:
mode:
authorCameron Zwarich <zwarich@mozilla.com>2014-09-19 19:57:50 -0700
committerCameron Zwarich <zwarich@mozilla.com>2014-09-20 11:54:11 -0700
commitd768ee77adab5e5f53b7fb978c07ddbb798e8954 (patch)
treeec960fb625e8f3c1717e79e8aa27ccb93336c637 /components/script/dom/htmlelement.rs
parent2c8d51a37c84fb5de531d00c45de9c0020930b11 (diff)
downloadservo-d768ee77adab5e5f53b7fb978c07ddbb798e8954.tar.gz
servo-d768ee77adab5e5f53b7fb978c07ddbb798e8954.zip
Convert various helper traits from &JSRef to JSRef
I converted them all with a few exceptions: - Methods that were used by trait objects, since trait objects don't work with `self` methods. - Methods that take an &'b JSRef<'a, T> and return an &'b. In reality, many (all?) could return an &'a instead, but this isn't allowed by the Deref trait. - Methods that internally rely on the same issue with Deref. - I left out the traits involved in layout entirely, even though not all of their methods suffer from one of the above problems. There will probably be solutions to all of these problems in the future.
Diffstat (limited to 'components/script/dom/htmlelement.rs')
-rw-r--r--components/script/dom/htmlelement.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/components/script/dom/htmlelement.rs b/components/script/dom/htmlelement.rs
index 4d9dccab7c9..1ae99e4367e 100644
--- a/components/script/dom/htmlelement.rs
+++ b/components/script/dom/htmlelement.rs
@@ -52,12 +52,12 @@ impl HTMLElement {
}
trait PrivateHTMLElementHelpers {
- fn is_body_or_frameset(&self) -> bool;
+ fn is_body_or_frameset(self) -> bool;
}
impl<'a> PrivateHTMLElementHelpers for JSRef<'a, HTMLElement> {
- fn is_body_or_frameset(&self) -> bool {
- let eventtarget: JSRef<EventTarget> = EventTargetCast::from_ref(*self);
+ fn is_body_or_frameset(self) -> bool {
+ let eventtarget: JSRef<EventTarget> = EventTargetCast::from_ref(self);
eventtarget.is_htmlbodyelement() || eventtarget.is_htmlframesetelement()
}
}