mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Move TrustedNodeAddress to script_layout_interface.
This commit is contained in:
parent
0616a60fd9
commit
68d603a6d0
9 changed files with 19 additions and 18 deletions
|
@ -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()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue