Struct script::layout_dom::ServoThreadSafeLayoutNode
source · pub struct ServoThreadSafeLayoutNode<'dom> {
pub(super) node: ServoLayoutNode<'dom>,
pub(super) pseudo: PseudoElementType,
}
Expand description
A wrapper around a ServoLayoutNode
that can be used safely on different threads.
It’s very important that this never mutate anything except this wrapped node and
never access any other node apart from its parent.
Fields§
§node: ServoLayoutNode<'dom>
The wrapped ServoLayoutNode
.
pseudo: PseudoElementType
The pseudo-element type, with (optionally) a specified display value to override the stylesheet.
Implementations§
source§impl<'dom> ServoThreadSafeLayoutNode<'dom>
impl<'dom> ServoThreadSafeLayoutNode<'dom>
sourcepub fn new(node: ServoLayoutNode<'dom>) -> Self
pub fn new(node: ServoLayoutNode<'dom>) -> Self
Creates a new ServoThreadSafeLayoutNode
from the given ServoLayoutNode
.
sourceunsafe fn get_jsmanaged(&self) -> LayoutDom<'dom, Node>
unsafe fn get_jsmanaged(&self) -> LayoutDom<'dom, Node>
Returns the interior of this node as a LayoutDom
. This is highly unsafe for layout to
call and as such is marked unsafe
.
sourceunsafe fn dangerous_first_child(&self) -> Option<Self>
unsafe fn dangerous_first_child(&self) -> Option<Self>
Get the first child of this node. Important: this is not safe for layout to call, so it should never be made public.
sourceunsafe fn dangerous_next_sibling(&self) -> Option<Self>
unsafe fn dangerous_next_sibling(&self) -> Option<Self>
Get the next sibling of this node. Important: this is not safe for layout to call, so it should never be made public.
Trait Implementations§
source§impl<'dom> Clone for ServoThreadSafeLayoutNode<'dom>
impl<'dom> Clone for ServoThreadSafeLayoutNode<'dom>
source§fn clone(&self) -> ServoThreadSafeLayoutNode<'dom>
fn clone(&self) -> ServoThreadSafeLayoutNode<'dom>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl<'dom> Debug for ServoThreadSafeLayoutNode<'dom>
impl<'dom> Debug for ServoThreadSafeLayoutNode<'dom>
source§impl<'dom> NodeInfo for ServoThreadSafeLayoutNode<'dom>
impl<'dom> NodeInfo for ServoThreadSafeLayoutNode<'dom>
source§fn is_element(&self) -> bool
fn is_element(&self) -> bool
source§fn is_text_node(&self) -> bool
fn is_text_node(&self) -> bool
source§impl<'dom> PartialEq for ServoThreadSafeLayoutNode<'dom>
impl<'dom> PartialEq for ServoThreadSafeLayoutNode<'dom>
source§fn eq(&self, other: &ServoThreadSafeLayoutNode<'dom>) -> bool
fn eq(&self, other: &ServoThreadSafeLayoutNode<'dom>) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl<'dom> ThreadSafeLayoutNode<'dom> for ServoThreadSafeLayoutNode<'dom>
impl<'dom> ThreadSafeLayoutNode<'dom> for ServoThreadSafeLayoutNode<'dom>
type ConcreteNode = ServoLayoutNode<'dom>
type ConcreteThreadSafeLayoutElement = ServoThreadSafeLayoutElement<'dom>
type ConcreteElement = ServoLayoutElement<'dom>
type ChildrenIterator = ServoThreadSafeLayoutNodeChildrenIterator<'dom>
source§fn opaque(&self) -> OpaqueNode
fn opaque(&self) -> OpaqueNode
OpaqueNode
.source§fn type_id(&self) -> Option<LayoutNodeType>
fn type_id(&self) -> Option<LayoutNodeType>
None
if this is a pseudo-element; otherwise, returns Some
.source§fn parent_style(&self) -> Arc<ComputedValues>
fn parent_style(&self) -> Arc<ComputedValues>
fn debug_id(self) -> usize
source§fn children(&self) -> LayoutIterator<Self::ChildrenIterator>
fn children(&self) -> LayoutIterator<Self::ChildrenIterator>
source§fn as_element(&self) -> Option<ServoThreadSafeLayoutElement<'dom>>
fn as_element(&self) -> Option<ServoThreadSafeLayoutElement<'dom>>
source§fn as_html_element(&self) -> Option<ServoThreadSafeLayoutElement<'dom>>
fn as_html_element(&self) -> Option<ServoThreadSafeLayoutElement<'dom>>
source§fn style_data(&self) -> Option<&'dom StyleData>
fn style_data(&self) -> Option<&'dom StyleData>
StyleData
for this node. Returns None if the node is unstyled.source§fn layout_data(&self) -> Option<&'dom GenericLayoutData>
fn layout_data(&self) -> Option<&'dom GenericLayoutData>
fn is_ignorable_whitespace(&self, context: &SharedStyleContext<'_>) -> bool
source§fn unsafe_get(self) -> Self::ConcreteNode
fn unsafe_get(self) -> Self::ConcreteNode
fn node_text_content(self) -> Cow<'dom, str>
source§fn selection(&self) -> Option<Range<ByteIndex>>
fn selection(&self) -> Option<Range<ByteIndex>>
None
.source§fn image_url(&self) -> Option<ServoUrl>
fn image_url(&self) -> Option<ServoUrl>
source§fn image_density(&self) -> Option<f64>
fn image_density(&self) -> Option<f64>
source§fn image_data(&self) -> Option<(Option<StdArc<Image>>, Option<ImageMetadata>)>
fn image_data(&self) -> Option<(Option<StdArc<Image>>, Option<ImageMetadata>)>
None
.fn canvas_data(&self) -> Option<HTMLCanvasData>
fn media_data(&self) -> Option<HTMLMediaData>
fn svg_data(&self) -> Option<SVGSVGData>
source§fn iframe_browsing_context_id(&self) -> Option<BrowsingContextId>
fn iframe_browsing_context_id(&self) -> Option<BrowsingContextId>
source§fn iframe_pipeline_id(&self) -> Option<PipelineId>
fn iframe_pipeline_id(&self) -> Option<PipelineId>
fn get_span(&self) -> Option<u32>
fn get_colspan(&self) -> Option<u32>
fn get_rowspan(&self) -> Option<u32>
fn get_before_pseudo(&self) -> Option<Self>
fn get_after_pseudo(&self) -> Option<Self>
fn get_details_summary_pseudo(&self) -> Option<Self>
fn get_details_content_pseudo(&self) -> Option<Self>
fn get_pseudo_element_type(&self) -> PseudoElementType
fn style(&self, context: &SharedStyleContext<'_>) -> Arc<ComputedValues>
fn selected_style(&self) -> Arc<ComputedValues>
source§fn is_content(&self) -> bool
fn is_content(&self) -> bool
empty_cells
per CSS 2.1 § 17.6.1.1.fn fragment_type(&self) -> FragmentType
impl<'dom> Copy for ServoThreadSafeLayoutNode<'dom>
impl<'dom> StructuralPartialEq for ServoThreadSafeLayoutNode<'dom>
Auto Trait Implementations§
impl<'dom> Freeze for ServoThreadSafeLayoutNode<'dom>
impl<'dom> !RefUnwindSafe for ServoThreadSafeLayoutNode<'dom>
impl<'dom> Send for ServoThreadSafeLayoutNode<'dom>
impl<'dom> Sync for ServoThreadSafeLayoutNode<'dom>
impl<'dom> Unpin for ServoThreadSafeLayoutNode<'dom>
impl<'dom> !UnwindSafe for ServoThreadSafeLayoutNode<'dom>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> Filterable for T
impl<T> Filterable for T
source§fn filterable(
self,
filter_name: &'static str,
) -> RequestFilterDataProvider<T, fn(_: DataRequest<'_>) -> bool>
fn filterable( self, filter_name: &'static str, ) -> RequestFilterDataProvider<T, fn(_: DataRequest<'_>) -> bool>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more