aboutsummaryrefslogtreecommitdiffstats
path: root/components/script_layout_interface/lib.rs
diff options
context:
space:
mode:
authorMs2ger <Ms2ger@gmail.com>2016-06-16 00:51:23 +0100
committerMs2ger <Ms2ger@gmail.com>2016-06-20 19:08:06 +0200
commit68d603a6d0a059965d2fa604d153b531cb16d404 (patch)
treecca1ff5fd05f7bc94682acf8ff00f50dafab11a5 /components/script_layout_interface/lib.rs
parent0616a60fd96199426d04cd75467906fca243af9c (diff)
downloadservo-68d603a6d0a059965d2fa604d153b531cb16d404.tar.gz
servo-68d603a6d0a059965d2fa604d153b531cb16d404.zip
Move TrustedNodeAddress to script_layout_interface.
Diffstat (limited to 'components/script_layout_interface/lib.rs')
-rw-r--r--components/script_layout_interface/lib.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/components/script_layout_interface/lib.rs b/components/script_layout_interface/lib.rs
index 8917aad6a76..d9037311f6a 100644
--- a/components/script_layout_interface/lib.rs
+++ b/components/script_layout_interface/lib.rs
@@ -22,6 +22,7 @@ extern crate core;
extern crate gfx_traits;
extern crate heapsize;
extern crate ipc_channel;
+extern crate libc;
extern crate msg;
extern crate range;
extern crate selectors;
@@ -36,6 +37,7 @@ pub mod wrapper_traits;
use canvas_traits::CanvasMsg;
use core::nonzero::NonZero;
use ipc_channel::ipc::IpcSender;
+use libc::c_void;
use restyle_damage::RestyleDamage;
use std::cell::RefCell;
use style::servo::PrivateStyleData;
@@ -87,3 +89,10 @@ pub struct HTMLCanvasData {
pub width: u32,
pub height: u32,
}
+
+/// The address of a node known to be valid. These are sent from script to layout.
+#[derive(Clone, PartialEq, Eq, Copy)]
+pub struct TrustedNodeAddress(pub *const c_void);
+
+#[allow(unsafe_code)]
+unsafe impl Send for TrustedNodeAddress {}