pub struct DomLayoutResult {
pub styled_dom: StyledDom,
pub layout_tree: LayoutTree,
pub calculated_positions: BTreeMap<usize, LogicalPosition>,
pub viewport: LogicalRect,
pub display_list: DisplayList,
pub scroll_ids: BTreeMap<usize, u64>,
pub scroll_id_to_node_id: BTreeMap<u64, NodeId>,
}Expand description
Result of a layout pass for a single DOM, before display list generation
Fields§
§styled_dom: StyledDomThe styled DOM that was laid out
layout_tree: LayoutTreeThe layout tree with computed sizes and positions
calculated_positions: BTreeMap<usize, LogicalPosition>Absolute positions of all nodes
viewport: LogicalRectThe viewport used for this layout
display_list: DisplayListThe generated display list for this DOM.
scroll_ids: BTreeMap<usize, u64>Stable scroll IDs computed from node_data_hash Maps layout node index -> external scroll ID
scroll_id_to_node_id: BTreeMap<u64, NodeId>Mapping from scroll IDs to DOM NodeIds for hit testing This allows us to map WebRender scroll IDs back to DOM nodes
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DomLayoutResult
impl !RefUnwindSafe for DomLayoutResult
impl Send for DomLayoutResult
impl Sync for DomLayoutResult
impl Unpin for DomLayoutResult
impl !UnwindSafe for DomLayoutResult
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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