Struct layout_2020::display_list::DisplayListBuilder
source · pub(crate) struct DisplayListBuilder<'a> {
current_scroll_node_id: ScrollTreeNodeId,
current_reference_frame_scroll_node_id: ScrollTreeNodeId,
current_clip_chain_id: ClipChainId,
element_for_canvas_background: OpaqueNode,
pub context: &'a LayoutContext<'a>,
pub display_list: &'a mut DisplayList,
is_contentful: bool,
}
Fields§
§current_scroll_node_id: ScrollTreeNodeId
The current ScrollTreeNodeId for this DisplayListBuilder. This allows only passing the builder instead passing the containing stacking_context::StackingContextContent::Fragment as an argument to display list building functions.
current_reference_frame_scroll_node_id: ScrollTreeNodeId
The current ScrollTreeNodeId for this DisplayListBuilder. This is necessary in addition
to the Self::current_scroll_node_id, because some pieces of fragments as backgrounds with
background-attachment: fixed
need to not scroll while the rest of the fragment does.
current_clip_chain_id: ClipChainId
The current wr::ClipId for this DisplayListBuilder. This allows only passing the builder instead passing the containing stacking_context::StackingContextContent::Fragment as an argument to display list building functions.
element_for_canvas_background: OpaqueNode
The OpaqueNode handle to the node used to paint the page background if the background was a canvas.
context: &'a LayoutContext<'a>
A LayoutContext used to get information about the device pixel ratio and get handles to WebRender images.
display_list: &'a mut DisplayList
The DisplayList used to collect display list items and metadata.
is_contentful: bool
Contentful paint i.e. whether the display list contains items of type text, image, non-white canvas or SVG). Used by metrics. See https://w3c.github.io/paint-timing/#first-contentful-paint.
Implementations§
source§impl<'a> DisplayListBuilder<'a>
impl<'a> DisplayListBuilder<'a>
fn wr(&mut self) -> &mut DisplayListBuilder
fn common_properties( &self, clip_rect: LayoutRect, style: &ComputedValues, ) -> CommonItemProperties
fn hit_info( &mut self, style: &ComputedValues, tag: Option<Tag>, auto_cursor: Cursor, ) -> Option<(u64, u16)>
Auto Trait Implementations§
impl<'a> Freeze for DisplayListBuilder<'a>
impl<'a> !RefUnwindSafe for DisplayListBuilder<'a>
impl<'a> Send for DisplayListBuilder<'a>
impl<'a> Sync for DisplayListBuilder<'a>
impl<'a> Unpin for DisplayListBuilder<'a>
impl<'a> !UnwindSafe for DisplayListBuilder<'a>
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> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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