aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/document.rs
diff options
context:
space:
mode:
authorMs2ger <Ms2ger@gmail.com>2016-04-29 14:55:38 +0200
committerMs2ger <Ms2ger@gmail.com>2016-04-29 14:55:52 +0200
commit897be5f6eefeaf0620460215b340e8a5b2c0fc95 (patch)
tree1f27cbb03ca111530f13916634e15fae635bcfec /components/script/dom/document.rs
parent207be7d2e23788197c175d7d0b5f172551251626 (diff)
downloadservo-897be5f6eefeaf0620460215b340e8a5b2c0fc95.tar.gz
servo-897be5f6eefeaf0620460215b340e8a5b2c0fc95.zip
Reduce channel cloning.
Diffstat (limited to 'components/script/dom/document.rs')
-rw-r--r--components/script/dom/document.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/components/script/dom/document.rs b/components/script/dom/document.rs
index a3da74213e3..191ea0a92fa 100644
--- a/components/script/dom/document.rs
+++ b/components/script/dom/document.rs
@@ -401,7 +401,7 @@ impl Document {
self.quirks_mode.set(mode);
if mode == Quirks {
- let LayoutChan(ref layout_chan) = self.window.layout_chan();
+ let LayoutChan(ref layout_chan) = *self.window.layout_chan();
layout_chan.send(Msg::SetQuirksMode).unwrap();
}
}
@@ -615,7 +615,7 @@ impl Document {
// Update the focus state for all elements in the focus chain.
// https://html.spec.whatwg.org/multipage/#focus-chain
if focus_type == FocusType::Element {
- let ConstellationChan(ref chan) = self.window.constellation_chan();
+ let ConstellationChan(ref chan) = *self.window.constellation_chan();
let event = ConstellationMsg::Focus(self.window.pipeline());
chan.send(event).unwrap();
}
@@ -1260,7 +1260,7 @@ impl Document {
pub fn trigger_mozbrowser_event(&self, event: MozBrowserEvent) {
if htmliframeelement::mozbrowser_enabled() {
if let Some((containing_pipeline_id, subpage_id)) = self.window.parent_info() {
- let ConstellationChan(ref chan) = self.window.constellation_chan();
+ let ConstellationChan(ref chan) = *self.window.constellation_chan();
let event = ConstellationMsg::MozBrowserEvent(containing_pipeline_id,
subpage_id,
event);
@@ -1277,7 +1277,7 @@ impl Document {
self.animation_frame_list.borrow_mut().insert(ident, callback);
// TODO: Should tick animation only when document is visible
- let ConstellationChan(ref chan) = self.window.constellation_chan();
+ let ConstellationChan(ref chan) = *self.window.constellation_chan();
let event = ConstellationMsg::ChangeRunningAnimationsState(self.window.pipeline(),
AnimationState::AnimationCallbacksPresent);
chan.send(event).unwrap();
@@ -1289,7 +1289,7 @@ impl Document {
pub fn cancel_animation_frame(&self, ident: u32) {
self.animation_frame_list.borrow_mut().remove(&ident);
if self.animation_frame_list.borrow().is_empty() {
- let ConstellationChan(ref chan) = self.window.constellation_chan();
+ let ConstellationChan(ref chan) = *self.window.constellation_chan();
let event = ConstellationMsg::ChangeRunningAnimationsState(self.window.pipeline(),
AnimationState::NoAnimationCallbacksPresent);
chan.send(event).unwrap();
@@ -1313,7 +1313,7 @@ impl Document {
// the next frame (which is the common case), we won't send a NoAnimationCallbacksPresent
// message quickly followed by an AnimationCallbacksPresent message.
if self.animation_frame_list.borrow().is_empty() {
- let ConstellationChan(ref chan) = self.window.constellation_chan();
+ let ConstellationChan(ref chan) = *self.window.constellation_chan();
let event = ConstellationMsg::ChangeRunningAnimationsState(self.window.pipeline(),
AnimationState::NoAnimationCallbacksPresent);
chan.send(event).unwrap();
@@ -1473,7 +1473,7 @@ impl Document {
pub fn notify_constellation_load(&self) {
let pipeline_id = self.window.pipeline();
- let ConstellationChan(ref chan) = self.window.constellation_chan();
+ let ConstellationChan(ref chan) = *self.window.constellation_chan();
let event = ConstellationMsg::DOMLoad(pipeline_id);
chan.send(event).unwrap();