aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/window.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/window.rs')
-rw-r--r--components/script/dom/window.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/components/script/dom/window.rs b/components/script/dom/window.rs
index 1df5d6490c8..384c46a04fb 100644
--- a/components/script/dom/window.rs
+++ b/components/script/dom/window.rs
@@ -304,6 +304,11 @@ impl Window {
}
}
+ /// Get a sender to the time profiler thread.
+ pub fn time_profiler_chan(&self) -> &TimeProfilerChan {
+ self.globalscope.time_profiler_chan()
+ }
+
pub fn origin(&self) -> &MutableOrigin {
self.globalscope.origin()
}
@@ -1040,6 +1045,10 @@ impl Window {
}
}
+ pub fn get_navigation_start(&self) -> f64 {
+ self.navigation_start_precise.get()
+ }
+
/// Cancels all the tasks associated with that window.
///
/// This sets the current `ignore_further_async_events` sentinel value to
@@ -1854,6 +1863,10 @@ impl Window {
WindowBinding::Wrap(runtime.cx(), win)
}
}
+
+ pub fn pipeline_id(&self) -> Option<PipelineId> {
+ Some(self.upcast::<GlobalScope>().pipeline_id())
+ }
}
fn should_move_clip_rect(clip_rect: Rect<Au>, new_viewport: Rect<f32>) -> bool {
@@ -1962,6 +1975,7 @@ impl Window {
let _ = self.script_chan.send(CommonScriptMsg::Task(
ScriptThreadEventCategory::DomEvent,
Box::new(self.task_canceller().wrap_task(task)),
+ self.pipeline_id()
));
}
}