Trait LayoutNodeHelpers

Source
pub(crate) trait LayoutNodeHelpers<'dom> {
Show 35 methods // Required methods fn type_id_for_layout(self) -> NodeTypeId; fn parent_node_ref(self) -> Option<LayoutDom<'dom, Node>>; fn composed_parent_node_ref(self) -> Option<LayoutDom<'dom, Node>>; fn first_child_ref(self) -> Option<LayoutDom<'dom, Node>>; fn last_child_ref(self) -> Option<LayoutDom<'dom, Node>>; fn prev_sibling_ref(self) -> Option<LayoutDom<'dom, Node>>; fn next_sibling_ref(self) -> Option<LayoutDom<'dom, Node>>; fn owner_doc_for_layout(self) -> LayoutDom<'dom, Document>; fn containing_shadow_root_for_layout( self, ) -> Option<LayoutDom<'dom, ShadowRoot>>; fn assigned_slot_for_layout( self, ) -> Option<LayoutDom<'dom, HTMLSlotElement>>; fn is_element_for_layout(&self) -> bool; fn is_text_node_for_layout(&self) -> bool; unsafe fn get_flag(self, flag: NodeFlags) -> bool; unsafe fn set_flag(self, flag: NodeFlags, value: bool); fn style_data(self) -> Option<&'dom StyleData>; fn layout_data(self) -> Option<&'dom GenericLayoutData>; unsafe fn initialize_style_data(self); unsafe fn initialize_layout_data(self, data: Box<GenericLayoutData>); unsafe fn clear_style_and_layout_data(self); fn is_text_input(&self) -> bool; fn is_single_line_text_inner_editor(&self) -> bool; fn is_text_container_of_single_line_input(&self) -> bool; fn text_content(self) -> Cow<'dom, str>; fn selection(self) -> Option<Range<usize>>; fn image_url(self) -> Option<ServoUrl>; fn image_density(self) -> Option<f64>; fn image_data(self) -> Option<(Option<Image>, Option<ImageMetadata>)>; fn canvas_data(self) -> Option<HTMLCanvasData>; fn media_data(self) -> Option<HTMLMediaData>; fn svg_data(self) -> Option<SVGElementData>; fn iframe_browsing_context_id(self) -> Option<BrowsingContextId>; fn iframe_pipeline_id(self) -> Option<PipelineId>; fn opaque(self) -> OpaqueNode; fn implemented_pseudo_element(&self) -> Option<PseudoElement>; fn is_in_ua_widget(&self) -> bool;
}

Required Methods§

Source

fn type_id_for_layout(self) -> NodeTypeId

Source

fn parent_node_ref(self) -> Option<LayoutDom<'dom, Node>>

Source

fn composed_parent_node_ref(self) -> Option<LayoutDom<'dom, Node>>

Source

fn first_child_ref(self) -> Option<LayoutDom<'dom, Node>>

Source

fn last_child_ref(self) -> Option<LayoutDom<'dom, Node>>

Source

fn prev_sibling_ref(self) -> Option<LayoutDom<'dom, Node>>

Source

fn next_sibling_ref(self) -> Option<LayoutDom<'dom, Node>>

Source

fn owner_doc_for_layout(self) -> LayoutDom<'dom, Document>

Source

fn containing_shadow_root_for_layout( self, ) -> Option<LayoutDom<'dom, ShadowRoot>>

Source

fn assigned_slot_for_layout(self) -> Option<LayoutDom<'dom, HTMLSlotElement>>

Source

fn is_element_for_layout(&self) -> bool

Source

fn is_text_node_for_layout(&self) -> bool

Source

unsafe fn get_flag(self, flag: NodeFlags) -> bool

Source

unsafe fn set_flag(self, flag: NodeFlags, value: bool)

Source

fn style_data(self) -> Option<&'dom StyleData>

Source

fn layout_data(self) -> Option<&'dom GenericLayoutData>

Source

unsafe fn initialize_style_data(self)

Initialize the style data of this node.

§Safety

This method is unsafe because it modifies the given node during layout. Callers should ensure that no other layout thread is attempting to read or modify the opaque layout data of this node.

Source

unsafe fn initialize_layout_data(self, data: Box<GenericLayoutData>)

Initialize the opaque layout data of this node.

§Safety

This method is unsafe because it modifies the given node during layout. Callers should ensure that no other layout thread is attempting to read or modify the opaque layout data of this node.

Source

unsafe fn clear_style_and_layout_data(self)

Clear the style and opaque layout data of this node.

§Safety

This method is unsafe because it modifies the given node during layout. Callers should ensure that no other layout thread is attempting to read or modify the opaque layout data of this node.

Source

fn is_text_input(&self) -> bool

Whether this element is a <input> rendered as text or a <textarea>. This is used for the rendering of text control element in the past where the necessities is being handled within layout. With the current implementation of Shadow DOM, we are able to move and expand this kind of behavior in the previous pipelines (i.e. DOM, style traversal).

Source

fn is_single_line_text_inner_editor(&self) -> bool

Whether this element serve as a container of editable text for a text input that is implemented as an UA widget.

Source

fn is_text_container_of_single_line_input(&self) -> bool

Whether this element serve as a container of any text inside a text input that is implemented as an UA widget.

Source

fn text_content(self) -> Cow<'dom, str>

Source

fn selection(self) -> Option<Range<usize>>

Source

fn image_url(self) -> Option<ServoUrl>

Source

fn image_density(self) -> Option<f64>

Source

fn image_data(self) -> Option<(Option<Image>, Option<ImageMetadata>)>

Source

fn canvas_data(self) -> Option<HTMLCanvasData>

Source

fn media_data(self) -> Option<HTMLMediaData>

Source

fn svg_data(self) -> Option<SVGElementData>

Source

fn iframe_browsing_context_id(self) -> Option<BrowsingContextId>

Source

fn iframe_pipeline_id(self) -> Option<PipelineId>

Source

fn opaque(self) -> OpaqueNode

Source

fn implemented_pseudo_element(&self) -> Option<PseudoElement>

Source

fn is_in_ua_widget(&self) -> bool

Implementors§

Source§

impl<'dom> LayoutNodeHelpers<'dom> for LayoutDom<'dom, Node>