LayoutResult

Struct LayoutResult 

Source
pub struct LayoutResult {
Show 23 fields pub dom_id: DomId, pub parent_dom_id: Option<DomId>, pub styled_dom: StyledDom, pub root_size: LayoutSize, pub root_position: LayoutPoint, pub preferred_widths: NodeDataContainer<Option<f32>>, pub preferred_heights: NodeDataContainer<Option<f32>>, pub width_calculated_rects: NodeDataContainer<WidthCalculatedRect>, pub height_calculated_rects: NodeDataContainer<HeightCalculatedRect>, pub solved_pos_x: NodeDataContainer<HorizontalSolvedPosition>, pub solved_pos_y: NodeDataContainer<VerticalSolvedPosition>, pub layout_flex_grows: NodeDataContainer<f32>, pub layout_displays: NodeDataContainer<CssPropertyValue<LayoutDisplay>>, pub layout_positions: NodeDataContainer<LayoutPosition>, pub layout_flex_directions: NodeDataContainer<LayoutFlexDirection>, pub layout_justify_contents: NodeDataContainer<LayoutJustifyContent>, pub rects: NodeDataContainer<PositionedRectangle>, pub words_cache: BTreeMap<NodeId, Words>, pub shaped_words_cache: BTreeMap<NodeId, ShapedWords>, pub positioned_words_cache: BTreeMap<NodeId, (WordPositions, FontInstanceKey)>, pub scrollable_nodes: ScrolledNodes, pub iframe_mapping: BTreeMap<NodeId, DomId>, pub gpu_value_cache: GpuValueCache,
}

Fields§

§dom_id: DomId§parent_dom_id: Option<DomId>§styled_dom: StyledDom§root_size: LayoutSize§root_position: LayoutPoint§preferred_widths: NodeDataContainer<Option<f32>>§preferred_heights: NodeDataContainer<Option<f32>>§width_calculated_rects: NodeDataContainer<WidthCalculatedRect>§height_calculated_rects: NodeDataContainer<HeightCalculatedRect>§solved_pos_x: NodeDataContainer<HorizontalSolvedPosition>§solved_pos_y: NodeDataContainer<VerticalSolvedPosition>§layout_flex_grows: NodeDataContainer<f32>§layout_displays: NodeDataContainer<CssPropertyValue<LayoutDisplay>>§layout_positions: NodeDataContainer<LayoutPosition>§layout_flex_directions: NodeDataContainer<LayoutFlexDirection>§layout_justify_contents: NodeDataContainer<LayoutJustifyContent>§rects: NodeDataContainer<PositionedRectangle>§words_cache: BTreeMap<NodeId, Words>§shaped_words_cache: BTreeMap<NodeId, ShapedWords>§positioned_words_cache: BTreeMap<NodeId, (WordPositions, FontInstanceKey)>§scrollable_nodes: ScrolledNodes§iframe_mapping: BTreeMap<NodeId, DomId>§gpu_value_cache: GpuValueCache

Implementations§

Source§

impl LayoutResult

Source

pub fn get_bounds(&self) -> LayoutRect

Source

pub fn get_cached_display_list( document_id: &DocumentId, dom_id: DomId, epoch: Epoch, layout_results: &[LayoutResult], full_window_state: &FullWindowState, gl_texture_cache: &GlTextureCache, renderer_resources: &RendererResources, image_cache: &ImageCache, ) -> CachedDisplayList

Source

pub fn do_quick_resize( id_namespace: IdNamespace, document_id: DocumentId, epoch: Epoch, dom_id: DomId, image_cache: &ImageCache, gl_context: &OptionGlContextPtr, layout_results: &mut [LayoutResult], gl_texture_cache: &mut GlTextureCache, renderer_resources: &mut RendererResources, callbacks: &RenderCallbacks, relayout_fn: RelayoutFn, fc_cache: &FcFontCache, window_size: &WindowSize, window_theme: WindowTheme, ) -> QuickResizeResult

Source

pub fn resize_images( id_namespace: IdNamespace, document_id: DocumentId, epoch: Epoch, dom_id: DomId, image_cache: &ImageCache, gl_context: &OptionGlContextPtr, layout_results: &mut [LayoutResult], gl_texture_cache: &mut GlTextureCache, renderer_resources: &mut RendererResources, callbacks: &RenderCallbacks, relayout_fn: RelayoutFn, fc_cache: &FcFontCache, window_size: &WindowSize, window_theme: WindowTheme, rsn: &BTreeMap<DomId, Vec<NodeId>>, ) -> Vec<UpdateImageResult>

Source

pub fn scroll_iframes( document_id: &DocumentId, dom_id: DomId, epoch: Epoch, layout_results: &[LayoutResult], full_window_state: &FullWindowState, gl_texture_cache: &GlTextureCache, renderer_resources: &RendererResources, image_cache: &ImageCache, )

Trait Implementations§

Source§

impl Debug for LayoutResult

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.