aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmlbodyelement.rs
diff options
context:
space:
mode:
authorDavid Zbarsky <dzbarsky@gmail.com>2015-11-02 22:26:50 -0800
committerDavid Zbarsky <dzbarsky@gmail.com>2015-11-03 19:51:46 -0800
commit722aa86c895b42798d60bcada41b0175dbafba52 (patch)
tree45d54ac56e4461f1ab3316a7796c4a8bc710e5b8 /components/script/dom/htmlbodyelement.rs
parentca56ebbb09f3c258d10e7a7fa276d42fe258d893 (diff)
downloadservo-722aa86c895b42798d60bcada41b0175dbafba52.tar.gz
servo-722aa86c895b42798d60bcada41b0175dbafba52.zip
Get rid of a bunch of explicit derefs
Diffstat (limited to 'components/script/dom/htmlbodyelement.rs')
-rw-r--r--components/script/dom/htmlbodyelement.rs18
1 files changed, 7 insertions, 11 deletions
diff --git a/components/script/dom/htmlbodyelement.rs b/components/script/dom/htmlbodyelement.rs
index b980e93dc5e..4ade3caf3ed 100644
--- a/components/script/dom/htmlbodyelement.rs
+++ b/components/script/dom/htmlbodyelement.rs
@@ -75,26 +75,22 @@ impl HTMLBodyElementMethods for HTMLBodyElement {
// https://html.spec.whatwg.org/multipage/#the-body-element
fn GetOnunload(&self) -> Option<Rc<EventHandlerNonNull>> {
- let win = window_from_node(self);
- win.r().GetOnunload()
+ window_from_node(self).GetOnunload()
}
// https://html.spec.whatwg.org/multipage/#the-body-element
fn SetOnunload(&self, listener: Option<Rc<EventHandlerNonNull>>) {
- let win = window_from_node(self);
- win.r().SetOnunload(listener)
+ window_from_node(self).SetOnunload(listener)
}
// https://html.spec.whatwg.org/multipage/#the-body-element
fn GetOnstorage(&self) -> Option<Rc<EventHandlerNonNull>> {
- let win = window_from_node(self);
- win.r().GetOnstorage()
+ window_from_node(self).GetOnstorage()
}
// https://html.spec.whatwg.org/multipage/#the-body-element
fn SetOnstorage(&self, listener: Option<Rc<EventHandlerNonNull>>) {
- let win = window_from_node(self);
- win.r().SetOnstorage(listener)
+ window_from_node(self).SetOnstorage(listener)
}
}
@@ -137,9 +133,9 @@ impl VirtualMethods for HTMLBodyElement {
}
let window = window_from_node(self);
- let document = window.r().Document();
- document.r().set_reflow_timeout(time::precise_time_ns() + INITIAL_REFLOW_DELAY);
- let ConstellationChan(ref chan) = window.r().constellation_chan();
+ let document = window.Document();
+ document.set_reflow_timeout(time::precise_time_ns() + INITIAL_REFLOW_DELAY);
+ let ConstellationChan(ref chan) = window.constellation_chan();
let event = ConstellationMsg::HeadParsed;
chan.send(event).unwrap();
}