Replace Root::deref() calls by Root::r() calls where possible.

This changes those calls that were already sound.
This commit is contained in:
Ms2ger 2015-01-01 12:20:52 +01:00
parent c9f26dfd59
commit 1dad710063
61 changed files with 479 additions and 471 deletions

View file

@ -56,12 +56,12 @@ impl HTMLBodyElement {
impl<'a> HTMLBodyElementMethods for JSRef<'a, HTMLBodyElement> {
fn GetOnunload(self) -> Option<EventHandlerNonNull> {
let win = window_from_node(self).root();
win.GetOnunload()
win.r().GetOnunload()
}
fn SetOnunload(self, listener: Option<EventHandlerNonNull>) {
let win = window_from_node(self).root();
win.SetOnunload(listener)
win.r().SetOnunload(listener)
}
}
@ -95,12 +95,12 @@ impl<'a> VirtualMethods for JSRef<'a, HTMLBodyElement> {
"onoffline", "ononline", "onpagehide", "onpageshow", "onpopstate",
"onstorage", "onresize", "onunload", "onerror"];
let window = window_from_node(*self).root();
let (cx, url, reflector) = (window.get_cx(),
window.get_url(),
window.reflector().get_jsobject());
let (cx, url, reflector) = (window.r().get_cx(),
window.r().get_url(),
window.r().reflector().get_jsobject());
let evtarget: JSRef<EventTarget> =
if FORWARDED_EVENTS.iter().any(|&event| name == event) {
EventTargetCast::from_ref(*window)
EventTargetCast::from_ref(window.r())
} else {
EventTargetCast::from_ref(*self)
};