pub struct DisplayList {
pub items: Vec<DisplayListItem>,
pub node_mapping: Vec<Option<NodeId>>,
pub forced_page_breaks: Vec<f32>,
}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.
Implementations§
Source§impl DisplayList
impl DisplayList
Sourcepub fn to_debug_json(&self) -> String
pub fn to_debug_json(&self) -> String
Generates a JSON representation of the display list for debugging. This includes clip chain analysis showing how clips are stacked.
Trait Implementations§
Source§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 Freeze for DisplayList
impl !RefUnwindSafe for DisplayList
impl Send for DisplayList
impl Sync for DisplayList
impl Unpin for DisplayList
impl !UnwindSafe 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> 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