mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
The constellation notifies the script thread about documents becoming inactive, active and fully active.
This commit is contained in:
parent
556a46f537
commit
a43c842099
14 changed files with 162 additions and 98 deletions
|
@ -1488,21 +1488,17 @@ impl Window {
|
|||
None
|
||||
}
|
||||
|
||||
pub fn freeze(&self) {
|
||||
pub fn suspend(&self) {
|
||||
self.upcast::<GlobalScope>().suspend();
|
||||
// A hint to the JS runtime that now would be a good time to
|
||||
// GC any unreachable objects generated by user script,
|
||||
// or unattached DOM nodes. Attached DOM nodes can't be GCd yet,
|
||||
// as the document might be thawed later.
|
||||
// as the document might be reactivated later.
|
||||
self.Gc();
|
||||
}
|
||||
|
||||
pub fn thaw(&self) {
|
||||
pub fn resume(&self) {
|
||||
self.upcast::<GlobalScope>().resume();
|
||||
|
||||
// Push the document title to the compositor since we are
|
||||
// activating this document due to a navigation.
|
||||
self.Document().title_changed();
|
||||
}
|
||||
|
||||
pub fn need_emit_timeline_marker(&self, timeline_type: TimelineMarkerType) -> bool {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue