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.rs10
1 files changed, 8 insertions, 2 deletions
diff --git a/components/script/dom/window.rs b/components/script/dom/window.rs
index df7fe995c1f..eaba1ded928 100644
--- a/components/script/dom/window.rs
+++ b/components/script/dom/window.rs
@@ -85,7 +85,7 @@ use servo_atoms::Atom;
use servo_config::opts;
use servo_config::prefs::PREFS;
use servo_geometry::{f32_rect_to_au_rect, max_rect};
-use servo_url::{Host, ImmutableOrigin, ServoUrl};
+use servo_url::{Host, MutableOrigin, ImmutableOrigin, ServoUrl};
use std::ascii::AsciiExt;
use std::borrow::ToOwned;
use std::cell::Cell;
@@ -286,6 +286,10 @@ impl Window {
}
}
+ pub fn origin(&self) -> &MutableOrigin {
+ self.globalscope.origin()
+ }
+
pub fn get_cx(&self) -> *mut JSContext {
self.js_runtime.borrow().as_ref().unwrap().cx()
}
@@ -1749,6 +1753,7 @@ impl Window {
id: PipelineId,
parent_info: Option<(PipelineId, FrameType)>,
window_size: Option<WindowSizeData>,
+ origin: MutableOrigin,
webvr_thread: Option<IpcSender<WebVRMsg>>)
-> Root<Window> {
let layout_rpc: Box<LayoutRPC + Send> = {
@@ -1771,7 +1776,8 @@ impl Window {
constellation_chan,
scheduler_chan,
resource_threads,
- timer_event_chan),
+ timer_event_chan,
+ origin),
script_chan: script_chan,
dom_manipulation_task_source: dom_task_source,
user_interaction_task_source: user_task_source,