mirror of
https://github.com/servo/servo.git
synced 2025-07-30 18:50:36 +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
|
@ -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;
|
||||
|
|
|
@ -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()
|
||||
}
|
||||
|
|
|
@ -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};
|
||||
|
|
|
@ -14,7 +14,7 @@ use ipc_channel::ipc::{IpcReceiver, IpcSender};
|
|||
use msg::constellation_msg::{PanicMsg, PipelineId, WindowSizeData};
|
||||
use net_traits::image_cache_thread::ImageCacheThread;
|
||||
use profile_traits::mem::ReportsChan;
|
||||
use script_layout_interface::OpaqueStyleAndLayoutData;
|
||||
use script_layout_interface::{OpaqueStyleAndLayoutData, TrustedNodeAddress};
|
||||
use script_traits::{ConstellationControlMsg, LayoutControlMsg, LayoutMsg as ConstellationMsg};
|
||||
use script_traits::{StackingContextScrollState, UntrustedNodeAddress};
|
||||
use std::sync::Arc;
|
||||
|
@ -37,7 +37,6 @@ pub use dom::htmlobjectelement::is_image_data;
|
|||
pub use dom::node::{CAN_BE_FRAGMENTED, HAS_CHANGED, HAS_DIRTY_DESCENDANTS, IS_DIRTY};
|
||||
pub use dom::node::LayoutNodeHelpers;
|
||||
pub use dom::node::Node;
|
||||
pub use dom::node::TrustedNodeAddress;
|
||||
pub use dom::text::Text;
|
||||
|
||||
|
||||
|
|
|
@ -36,13 +36,13 @@ use layout_interface::{CharacterDataTypeId, Document, Element, ElementTypeId};
|
|||
use layout_interface::{HTMLElementTypeId, LayoutCharacterDataHelpers};
|
||||
use layout_interface::{LayoutDocumentHelpers, LayoutElementHelpers, LayoutJS};
|
||||
use layout_interface::{LayoutNodeHelpers, Node, NodeTypeId};
|
||||
use layout_interface::{RawLayoutElementHelpers, Text, TrustedNodeAddress};
|
||||
use layout_interface::{RawLayoutElementHelpers, Text};
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use range::Range;
|
||||
use script_layout_interface::restyle_damage::RestyleDamage;
|
||||
use script_layout_interface::wrapper_traits::{DangerousThreadSafeLayoutNode, LayoutNode, PseudoElementType};
|
||||
use script_layout_interface::wrapper_traits::{ThreadSafeLayoutNode, ThreadSafeLayoutElement};
|
||||
use script_layout_interface::{HTMLCanvasData, LayoutNodeType};
|
||||
use script_layout_interface::{HTMLCanvasData, LayoutNodeType, TrustedNodeAddress};
|
||||
use script_layout_interface::{OpaqueStyleAndLayoutData, PartialStyleAndLayoutData};
|
||||
use selectors::matching::{DeclarationBlock, ElementFlags};
|
||||
use selectors::parser::{AttrSelector, NamespaceConstraint};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue