diff options
author | David Zbarsky <dzbarsky@gmail.com> | 2015-11-02 22:26:50 -0800 |
---|---|---|
committer | David Zbarsky <dzbarsky@gmail.com> | 2015-11-03 19:51:46 -0800 |
commit | 722aa86c895b42798d60bcada41b0175dbafba52 (patch) | |
tree | 45d54ac56e4461f1ab3316a7796c4a8bc710e5b8 /components/script/dom/window.rs | |
parent | ca56ebbb09f3c258d10e7a7fa276d42fe258d893 (diff) | |
download | servo-722aa86c895b42798d60bcada41b0175dbafba52.tar.gz servo-722aa86c895b42798d60bcada41b0175dbafba52.zip |
Get rid of a bunch of explicit derefs
Diffstat (limited to 'components/script/dom/window.rs')
-rw-r--r-- | components/script/dom/window.rs | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/components/script/dom/window.rs b/components/script/dom/window.rs index 4abdcc3337e..69ddff9430a 100644 --- a/components/script/dom/window.rs +++ b/components/script/dom/window.rs @@ -379,7 +379,7 @@ impl WindowMethods for Window { // https://html.spec.whatwg.org/multipage/#dom-location fn Location(&self) -> Root<Location> { - self.Document().r().Location() + self.Document().Location() } // https://html.spec.whatwg.org/multipage/#dom-sessionstorage @@ -533,13 +533,13 @@ impl WindowMethods for Window { let _ = callback.Call__(Finite::wrap(now), ExceptionHandling::Report); }; - doc.r().request_animation_frame(Box::new(callback)) + doc.request_animation_frame(Box::new(callback)) } /// https://html.spec.whatwg.org/multipage/#dom-window-cancelanimationframe fn CancelAnimationFrame(&self, ident: u32) { let doc = self.Document(); - doc.r().cancel_animation_frame(ident); + doc.cancel_animation_frame(ident); } // https://html.spec.whatwg.org/multipage/#dom-window-captureevents @@ -908,7 +908,7 @@ impl Window { goal: goal, page_clip_rect: self.page_clip_rect.get(), }, - document: self.Document().r().upcast::<Node>().to_trusted_node_address(), + document: self.Document().upcast::<Node>().to_trusted_node_address(), window_size: window_size, script_join_chan: join_chan, query_type: query_type, @@ -1042,8 +1042,7 @@ impl Window { } pub fn get_url(&self) -> Url { - let doc = self.Document(); - (*doc.r().url()).clone() + (*self.Document().url()).clone() } pub fn resource_task(&self) -> ResourceTask { @@ -1140,8 +1139,7 @@ impl Window { // Push the document title to the compositor since we are // activating this document due to a navigation. - let document = self.Document(); - document.r().title_changed(); + self.Document().title_changed(); } pub fn freeze(&self) { |