mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Make window.close() close the window.
This commit is contained in:
parent
6c90dd54b2
commit
32ed715055
3 changed files with 6 additions and 0 deletions
|
@ -67,6 +67,10 @@ impl ScriptListener for CompositorChan {
|
||||||
self.chan.send(InvalidateRect(id, rect));
|
self.chan.send(InvalidateRect(id, rect));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn close(&self) {
|
||||||
|
self.chan.send(Exit);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Implementation of the abstract `RenderListener` interface.
|
/// Implementation of the abstract `RenderListener` interface.
|
||||||
|
|
|
@ -80,6 +80,7 @@ pub trait RenderListener {
|
||||||
pub trait ScriptListener : Clone {
|
pub trait ScriptListener : Clone {
|
||||||
fn set_ready_state(&self, ReadyState);
|
fn set_ready_state(&self, ReadyState);
|
||||||
fn invalidate_rect(&self, PipelineId, Rect<uint>);
|
fn invalidate_rect(&self, PipelineId, Rect<uint>);
|
||||||
|
fn close(&self);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The interface used by the quadtree to get info about LayerBuffers
|
/// The interface used by the quadtree to get info about LayerBuffers
|
||||||
|
|
|
@ -564,6 +564,7 @@ impl ScriptTask {
|
||||||
}
|
}
|
||||||
page.layout_chan.send(layout_interface::ExitMsg);
|
page.layout_chan.send(layout_interface::ExitMsg);
|
||||||
}
|
}
|
||||||
|
self.compositor.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The entry point to document loading. Defines bindings, sets up the window and document
|
/// The entry point to document loading. Defines bindings, sets up the window and document
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue