diff options
author | bors-servo <metajack+bors@gmail.com> | 2015-07-14 08:46:07 -0600 |
---|---|---|
committer | bors-servo <metajack+bors@gmail.com> | 2015-07-14 08:46:07 -0600 |
commit | 64751b8eef5b95de9ac3b9a382b4cb4408cb90c0 (patch) | |
tree | 4e02e50c4a9678df7cb1057d0da2b5a284866e3c /components/script/dom | |
parent | 7de4ba0f826f8239d6ac540417028265e62085c5 (diff) | |
parent | 9ce65c08a51d1a2a62c1d50ca97415f31df2e5fe (diff) | |
download | servo-64751b8eef5b95de9ac3b9a382b4cb4408cb90c0.tar.gz servo-64751b8eef5b95de9ac3b9a382b4cb4408cb90c0.zip |
Auto merge of #6596 - pcwalton:layout-control-ipc, r=jdm
compositing: Make `ScriptListener` and `LayoutControlChan` messages go over IPC.
r? @jdm
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6596)
<!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom')
-rw-r--r-- | components/script/dom/bindings/trace.rs | 2 | ||||
-rw-r--r-- | components/script/dom/document.rs | 12 | ||||
-rw-r--r-- | components/script/dom/window.rs | 6 |
3 files changed, 12 insertions, 8 deletions
diff --git a/components/script/dom/bindings/trace.rs b/components/script/dom/bindings/trace.rs index b64d46a212e..43e9814242e 100644 --- a/components/script/dom/bindings/trace.rs +++ b/components/script/dom/bindings/trace.rs @@ -328,7 +328,7 @@ impl<A,B> JSTraceable for fn(A) -> B { } } -impl JSTraceable for Box<ScriptListener+'static> { +impl JSTraceable for ScriptListener { #[inline] fn trace(&self, _: *mut JSTracer) { // Do nothing diff --git a/components/script/dom/document.rs b/components/script/dom/document.rs index 83a9e5dedd4..7ddced8ef0d 100644 --- a/components/script/dom/document.rs +++ b/components/script/dom/document.rs @@ -251,8 +251,11 @@ pub trait DocumentHelpers<'a> { fn title_changed(self); fn send_title_to_compositor(self); fn dirty_all_nodes(self); - fn dispatch_key_event(self, key: Key, state: KeyState, - modifiers: KeyModifiers, compositor: &mut Box<ScriptListener+'static>); + fn dispatch_key_event(self, + key: Key, + state: KeyState, + modifiers: KeyModifiers, + compositor: &mut ScriptListener); fn node_from_nodes_and_strings(self, nodes: Vec<NodeOrString>) -> Fallible<Root<Node>>; fn get_body_attribute(self, local_name: &Atom) -> DOMString; @@ -760,10 +763,11 @@ impl<'a> DocumentHelpers<'a> for &'a Document { } /// The entry point for all key processing for web content - fn dispatch_key_event(self, key: Key, + fn dispatch_key_event(self, + key: Key, state: KeyState, modifiers: KeyModifiers, - compositor: &mut Box<ScriptListener+'static>) { + compositor: &mut ScriptListener) { let window = self.window.root(); let focused = self.get_focused_element(); let body = self.GetBody(); diff --git a/components/script/dom/window.rs b/components/script/dom/window.rs index b781d7e19a1..984a8d4fb01 100644 --- a/components/script/dom/window.rs +++ b/components/script/dom/window.rs @@ -105,7 +105,7 @@ pub struct Window { navigator: MutNullableHeap<JS<Navigator>>, image_cache_task: ImageCacheTask, image_cache_chan: ImageCacheChan, - compositor: DOMRefCell<Box<ScriptListener+'static>>, + compositor: DOMRefCell<ScriptListener>, browser_context: DOMRefCell<Option<BrowserContext>>, page: Rc<Page>, performance: MutNullableHeap<JS<Performance>>, @@ -241,7 +241,7 @@ impl Window { &self.image_cache_task } - pub fn compositor<'a>(&'a self) -> RefMut<'a, Box<ScriptListener+'static>> { + pub fn compositor<'a>(&'a self) -> RefMut<'a, ScriptListener> { self.compositor.borrow_mut() } @@ -964,7 +964,7 @@ impl Window { script_chan: Box<ScriptChan+Send>, image_cache_chan: ImageCacheChan, control_chan: ScriptControlChan, - compositor: Box<ScriptListener+'static>, + compositor: ScriptListener, image_cache_task: ImageCacheTask, resource_task: ResourceTask, storage_task: StorageTask, |