diff options
author | Ms2ger <Ms2ger@gmail.com> | 2016-06-16 00:51:23 +0100 |
---|---|---|
committer | Ms2ger <Ms2ger@gmail.com> | 2016-06-20 19:08:06 +0200 |
commit | 68d603a6d0a059965d2fa604d153b531cb16d404 (patch) | |
tree | cca1ff5fd05f7bc94682acf8ff00f50dafab11a5 /components/script_layout_interface | |
parent | 0616a60fd96199426d04cd75467906fca243af9c (diff) | |
download | servo-68d603a6d0a059965d2fa604d153b531cb16d404.tar.gz servo-68d603a6d0a059965d2fa604d153b531cb16d404.zip |
Move TrustedNodeAddress to script_layout_interface.
Diffstat (limited to 'components/script_layout_interface')
-rw-r--r-- | components/script_layout_interface/Cargo.toml | 1 | ||||
-rw-r--r-- | components/script_layout_interface/lib.rs | 9 |
2 files changed, 10 insertions, 0 deletions
diff --git a/components/script_layout_interface/Cargo.toml b/components/script_layout_interface/Cargo.toml index 5765f4a5e90..79d0c10682c 100644 --- a/components/script_layout_interface/Cargo.toml +++ b/components/script_layout_interface/Cargo.toml @@ -15,6 +15,7 @@ gfx_traits = {path = "../gfx_traits"} heapsize = "0.3.0" heapsize_plugin = "0.1.2" ipc-channel = {git = "https://github.com/servo/ipc-channel"} +libc = "0.2" msg = {path = "../msg"} plugins = {path = "../plugins"} range = {path = "../range"} 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 {} |