NodeExt

Trait NodeExt 

Source
pub(crate) trait NodeExt<'dom> {
Show 14 methods // Required methods fn as_image(&self) -> Option<(Option<Image>, PhysicalSize<f64>)>; fn as_canvas(&self) -> Option<(CanvasInfo, PhysicalSize<f64>)>; fn as_iframe(&self) -> Option<(PipelineId, BrowsingContextId)>; fn as_video(&self) -> Option<(Option<ImageKey>, Option<PhysicalSize<f64>>)>; fn as_svg(&self) -> Option<SVGElementData<'dom>>; fn as_typeless_object_with_data_attribute(&self) -> Option<String>; fn ensure_inner_layout_data(&self) -> AtomicRefMut<'dom, InnerDOMLayoutData>; fn inner_layout_data(&self) -> Option<AtomicRef<'dom, InnerDOMLayoutData>>; fn box_slot(&self) -> BoxSlot<'dom>; fn unset_all_boxes(&self); fn fragments_for_pseudo( &self, pseudo_element: Option<PseudoElement>, ) -> Vec<Fragment>; fn with_layout_box_base_including_pseudos( &self, callback: impl Fn(&LayoutBoxBase), ); fn repair_style(&self, context: &SharedStyleContext<'_>); fn isolates_box_tree_rebuild_damage(&self) -> bool;
}

Required Methods§

Source

fn as_image(&self) -> Option<(Option<Image>, PhysicalSize<f64>)>

Returns the image if it’s loaded, and its size in image pixels adjusted for image_density.

Source

fn as_canvas(&self) -> Option<(CanvasInfo, PhysicalSize<f64>)>

Source

fn as_iframe(&self) -> Option<(PipelineId, BrowsingContextId)>

Source

fn as_video(&self) -> Option<(Option<ImageKey>, Option<PhysicalSize<f64>>)>

Source

fn as_svg(&self) -> Option<SVGElementData<'dom>>

Source

fn as_typeless_object_with_data_attribute(&self) -> Option<String>

Source

fn ensure_inner_layout_data(&self) -> AtomicRefMut<'dom, InnerDOMLayoutData>

Source

fn inner_layout_data(&self) -> Option<AtomicRef<'dom, InnerDOMLayoutData>>

Source

fn box_slot(&self) -> BoxSlot<'dom>

Source

fn unset_all_boxes(&self)

Remove boxes for the element itself, and all of its pseudo-element boxes.

Source

fn fragments_for_pseudo( &self, pseudo_element: Option<PseudoElement>, ) -> Vec<Fragment>

Source

fn with_layout_box_base_including_pseudos( &self, callback: impl Fn(&LayoutBoxBase), )

Source

fn repair_style(&self, context: &SharedStyleContext<'_>)

Source

fn isolates_box_tree_rebuild_damage(&self) -> bool

Whether or not this node isolates downward flowing box tree rebuild damage. Roughly, this corresponds to independent formatting context boundaries. The node’s boxes themselves will be rebuilt, but not the descendant node’s boxes. When this node has no box yet, false is returned.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<'dom> NodeExt<'dom> for ServoThreadSafeLayoutNode<'dom>

Implementors§