pub struct DisplayList {
pub items: Vec<DisplayListItem>,
pub node_mapping: Vec<Option<NodeId>>,
pub forced_page_breaks: Vec<f32>,
pub fixed_position_item_ranges: Vec<(usize, usize)>,
}Expand description
The final, renderer-agnostic output of the layout engine.
This is a flat list of drawing and state-management commands, already sorted according to the CSS paint order. A renderer can consume this list directly.
Fields§
§items: Vec<DisplayListItem>§node_mapping: Vec<Option<NodeId>>Optional mapping from item index to the DOM NodeId that generated it.
Used for pagination to look up CSS break properties.
Not all items have a source node (e.g., synthesized decorations).
forced_page_breaks: Vec<f32>Y-positions where forced page breaks should occur (from break-before/break-after: always). These are absolute Y coordinates in the infinite canvas coordinate system. The slicer will ensure page boundaries align with these positions.
fixed_position_item_ranges: Vec<(usize, usize)>Index ranges (start, end) of display list items that belong to fixed-position elements. In paged media, these items are replicated on every page (CSS Positioned Layout §2.1).
Trait Implementations§
Source§impl Clone for DisplayList
impl Clone for DisplayList
Source§fn clone(&self) -> DisplayList
fn clone(&self) -> DisplayList
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DisplayList
impl Debug for DisplayList
Source§impl Default for DisplayList
impl Default for DisplayList
Source§fn default() -> DisplayList
fn default() -> DisplayList
Auto Trait Implementations§
impl !RefUnwindSafe for DisplayList
impl !UnwindSafe for DisplayList
impl Freeze for DisplayList
impl Send for DisplayList
impl Sync for DisplayList
impl Unpin for DisplayList
impl UnsafeUnpin for DisplayList
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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