aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom')
-rw-r--r--components/script/dom/bindings/js.rs2
-rw-r--r--components/script/dom/node.rs13
-rw-r--r--components/script/dom/window.rs3
3 files changed, 4 insertions, 14 deletions
diff --git a/components/script/dom/bindings/js.rs b/components/script/dom/bindings/js.rs
index f8ddb80e44b..12ff0aa8823 100644
--- a/components/script/dom/bindings/js.rs
+++ b/components/script/dom/bindings/js.rs
@@ -33,7 +33,7 @@ use dom::node::Node;
use heapsize::HeapSizeOf;
use js::jsapi::{Heap, JSObject, JSTracer};
use js::jsval::JSVal;
-use layout_interface::TrustedNodeAddress;
+use script_layout_interface::TrustedNodeAddress;
use script_thread::STACK_ROOTS;
use std::cell::UnsafeCell;
use std::default::Default;
diff --git a/components/script/dom/node.rs b/components/script/dom/node.rs
index cf3257e7137..fdb9deed87b 100644
--- a/components/script/dom/node.rs
+++ b/components/script/dom/node.rs
@@ -62,7 +62,7 @@ use msg::constellation_msg::PipelineId;
use parse::html::parse_html_fragment;
use ref_slice::ref_slice;
use script_layout_interface::{HTMLCanvasData, OpaqueStyleAndLayoutData};
-use script_layout_interface::{LayoutNodeType, LayoutElementType};
+use script_layout_interface::{LayoutNodeType, LayoutElementType, TrustedNodeAddress};
use script_traits::UntrustedNodeAddress;
use selectors::matching::matches;
use selectors::parser::Selector;
@@ -2409,17 +2409,6 @@ impl NodeMethods for Node {
}
}
-
-
-/// The address of a node known to be valid. These are sent from script to layout,
-/// and are also used in the HTML parser interface.
-
-#[derive(Clone, PartialEq, Eq, Copy)]
-pub struct TrustedNodeAddress(pub *const c_void);
-
-#[allow(unsafe_code)]
-unsafe impl Send for TrustedNodeAddress {}
-
pub fn document_from_node<T: DerivedFrom<Node> + Reflectable>(derived: &T) -> Root<Document> {
derived.upcast().owner_doc()
}
diff --git a/components/script/dom/window.rs b/components/script/dom/window.rs
index 03fbe2b2a2b..f2f3195c875 100644
--- a/components/script/dom/window.rs
+++ b/components/script/dom/window.rs
@@ -31,7 +31,7 @@ use dom::element::Element;
use dom::eventtarget::EventTarget;
use dom::location::Location;
use dom::navigator::Navigator;
-use dom::node::{Node, TrustedNodeAddress, from_untrusted_node_address, window_from_node};
+use dom::node::{Node, from_untrusted_node_address, window_from_node};
use dom::performance::Performance;
use dom::screen::Screen;
use dom::storage::Storage;
@@ -59,6 +59,7 @@ use profile_traits::time::{ProfilerCategory, TimerMetadata, TimerMetadataFrameTy
use profile_traits::time::{ProfilerChan, TimerMetadataReflowType, profile};
use reporter::CSSErrorReporter;
use rustc_serialize::base64::{FromBase64, STANDARD, ToBase64};
+use script_layout_interface::TrustedNodeAddress;
use script_runtime::{ScriptChan, ScriptPort};
use script_thread::SendableMainThreadScriptChan;
use script_thread::{MainThreadScriptChan, MainThreadScriptMsg, RunnableWrapper};