mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
compositing: Move messages that go over the ScriptListener
to go over
an IPC channel instead. Because this used a boxed trait object to invoke messages across a process boundary, and boxed trait objects are not supported across IPC, we spawn a helper thread inside the compositor to perform the marshaling for us.
This commit is contained in:
parent
2947d78e4e
commit
e841065351
14 changed files with 211 additions and 82 deletions
|
@ -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;
|
||||
|
@ -763,10 +766,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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue