Trait layout_2020::dom::NodeExt
source · pub(crate) trait NodeExt<'dom>: 'dom + LayoutNode<'dom> {
// Required methods
fn as_image(self) -> Option<(Option<Arc<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_typeless_object_with_data_attribute(self) -> Option<String>;
fn style(self, context: &LayoutContext<'_>) -> ServoArc<ComputedValues>;
fn layout_data_mut(self) -> AtomicRefMut<'dom, InnerDOMLayoutData>;
fn layout_data(self) -> Option<AtomicRef<'dom, InnerDOMLayoutData>>;
fn element_box_slot(&self) -> BoxSlot<'dom>;
fn pseudo_element_box_slot(
&self,
which: WhichPseudoElement,
) -> BoxSlot<'dom>;
fn unset_pseudo_element_box(self, which: WhichPseudoElement);
fn unset_all_boxes(self);
}
Required Methods§
sourcefn as_image(self) -> Option<(Option<Arc<Image>>, PhysicalSize<f64>)>
fn as_image(self) -> Option<(Option<Arc<Image>>, PhysicalSize<f64>)>
Returns the image if it’s loaded, and its size in image pixels
adjusted for image_density
.
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_typeless_object_with_data_attribute(self) -> Option<String>
fn style(self, context: &LayoutContext<'_>) -> ServoArc<ComputedValues>
fn layout_data_mut(self) -> AtomicRefMut<'dom, InnerDOMLayoutData>
fn layout_data(self) -> Option<AtomicRef<'dom, InnerDOMLayoutData>>
fn element_box_slot(&self) -> BoxSlot<'dom>
fn pseudo_element_box_slot(&self, which: WhichPseudoElement) -> BoxSlot<'dom>
fn unset_pseudo_element_box(self, which: WhichPseudoElement)
sourcefn unset_all_boxes(self)
fn unset_all_boxes(self)
Remove boxes for the element itself, and its :before
and :after
if any.
Object Safety§
This trait is not object safe.