pub(crate) trait NodeExt<'dom> {
Show 22 methods
// Required methods
fn as_image(&self) -> Option<(ImageInfo, PhysicalSize<f64>)>;
fn as_canvas(&self) -> Option<(CanvasInfo, PhysicalSize<f64>)>;
fn as_iframe(&self) -> Option<IFrameInfo>;
fn as_video(&self) -> Option<(VideoInfo, 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 inner_layout_data_mut(
&self,
) -> Option<AtomicRefMut<'dom, InnerDOMLayoutData>>;
fn box_slot(&self) -> BoxSlot<'dom>;
fn unset_all_boxes(&self);
fn clear_fragments_and_dirty_fragment_caches(&self);
fn clear_fragments_and_dirty_fragment_caches_recursively(&self);
fn clear_fragments_and_dirty_fragment_caches_of_descendants(&self);
fn rendering_type(&self) -> NodeRenderingType;
fn fragments_for_pseudo(
&self,
pseudo_element: Option<PseudoElement>,
) -> Vec<Fragment>;
fn with_layout_box_base(&self, callback: impl FnMut(&LayoutBoxBase));
fn with_layout_box_base_including_pseudos(
&self,
callback: impl FnMut(&LayoutBoxBase),
);
fn repair_style(&self, context: &SharedStyleContext<'_>);
fn isolates_damage_for_damage_propagation(&self) -> bool;
fn rebuild_box_tree_from_independent_formatting_context(
&self,
layout_context: &LayoutContext<'_>,
) -> bool;
fn is_absolutely_positioned(&self) -> bool;
}Required Methods§
Sourcefn as_image(&self) -> Option<(ImageInfo, PhysicalSize<f64>)>
fn as_image(&self) -> Option<(ImageInfo, PhysicalSize<f64>)>
Returns the relevant data wrapping into respective struct and its size in pixels.
fn as_canvas(&self) -> Option<(CanvasInfo, PhysicalSize<f64>)>
fn as_iframe(&self) -> Option<IFrameInfo>
fn as_video(&self) -> Option<(VideoInfo, 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 inner_layout_data_mut( &self, ) -> Option<AtomicRefMut<'dom, InnerDOMLayoutData>>
fn box_slot(&self) -> BoxSlot<'dom>
Sourcefn unset_all_boxes(&self)
fn unset_all_boxes(&self)
Remove boxes for the element itself, and all of its pseudo-element boxes.
Sourcefn clear_fragments_and_dirty_fragment_caches(&self)
fn clear_fragments_and_dirty_fragment_caches(&self)
Clear laid out Fragments and dirty Fragment caches for all of this node’s boxes,
ensuring that the next FragmentTree layout that happens at this node is complete.
Sourcefn clear_fragments_and_dirty_fragment_caches_recursively(&self)
fn clear_fragments_and_dirty_fragment_caches_recursively(&self)
Clear laid out Fragments and dirty Fragment caches for all this node’s boxes and
descendant’s boxes, ensuring that the next FragmentTree layout that happens at and
below this node is complete.
Sourcefn clear_fragments_and_dirty_fragment_caches_of_descendants(&self)
fn clear_fragments_and_dirty_fragment_caches_of_descendants(&self)
Clear laid out Fragments and dirty Fragment caches for all this node’s descendant’s
boxes.
Sourcefn rendering_type(&self) -> NodeRenderingType
fn rendering_type(&self) -> NodeRenderingType
Returns the NodeRenderingType for this LayoutNode which describes whether
the node is being rendered, delegating rendering, or not being rendered at all
based on whether it has a LayoutBox and what kind.
fn fragments_for_pseudo( &self, pseudo_element: Option<PseudoElement>, ) -> Vec<Fragment>
fn with_layout_box_base(&self, callback: impl FnMut(&LayoutBoxBase))
fn with_layout_box_base_including_pseudos( &self, callback: impl FnMut(&LayoutBoxBase), )
fn repair_style(&self, context: &SharedStyleContext<'_>)
Sourcefn isolates_damage_for_damage_propagation(&self) -> bool
fn isolates_damage_for_damage_propagation(&self) -> bool
Whether or not this node isolates downward flowing box tree rebuild damage and fragment tree layout cache damage. Roughly, this corresponds to independent formatting context boundaries.
- The node’s boxes themselves will be rebuilt, but not the descendant node’s boxes.
- The node’s fragment tree layout will be rebuilt, not the descendent node’s fragment tree layout cache.
When this node has no box yet, false is returned.
Sourcefn rebuild_box_tree_from_independent_formatting_context(
&self,
layout_context: &LayoutContext<'_>,
) -> bool
fn rebuild_box_tree_from_independent_formatting_context( &self, layout_context: &LayoutContext<'_>, ) -> bool
Try to re-run box tree reconstruction from this point. This can succeed if the node itself is still valid and isolates box tree damage from ancestors (for instance, if it starts an independent formatting context). Note: This assumes that no ancestors have box damage.
Returns true if box tree reconstruction was sucessful and false otherwise.
Sourcefn is_absolutely_positioned(&self) -> bool
fn is_absolutely_positioned(&self) -> bool
Whether or not the style of this node indicates that it should be absolutely positioned.
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.