pub(crate) struct ContainingBlock {
scroll_node_id: ScrollTreeNodeId,
scroll_frame_size: Option<LayoutSize>,
clip_id: ClipId,
rect: PhysicalRect<Au>,
accumulated_reference_frame_offset: PhysicalVec<Au>,
established_scroll_frame: bool,
}Fields§
§scroll_node_id: ScrollTreeNodeIdThe SpatialId of the spatial node that contains the children of this containing block.
scroll_frame_size: Option<LayoutSize>The size of the parent scroll frame of this containing block, used for resolving sticky margins. If this is None, then this is a direct descendant of a reference frame and sticky positioning isn’t taken into account.
clip_id: ClipIdThe ClipId to use for the children of this containing block.
rect: PhysicalRect<Au>The physical rect of this containing block.
accumulated_reference_frame_offset: PhysicalVec<Au>Normally containing block offsets and display list items are positioned relative to their parent reference frame, but cumulative containing block boundaries on fragments need to disregard reference frames entirely. This value tracks the accumulated offset from the origin of the parent reference frame of this containing block.
established_scroll_frame: boolWhether current containing block established a scroll frame.
Implementations§
Source§impl ContainingBlock
impl ContainingBlock
pub(crate) fn new( rect: PhysicalRect<Au>, scroll_node_id: ScrollTreeNodeId, scroll_frame_size: Option<LayoutSize>, clip_id: ClipId, accumulated_reference_frame_offset: PhysicalVec<Au>, established_scroll_frame: bool, ) -> Self
pub(crate) fn new_replacing_rect(&self, rect: &PhysicalRect<Au>) -> Self
Trait Implementations§
Source§impl Clone for ContainingBlock
impl Clone for ContainingBlock
Source§fn clone(&self) -> ContainingBlock
fn clone(&self) -> ContainingBlock
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for ContainingBlock
impl RefUnwindSafe for ContainingBlock
impl Send for ContainingBlock
impl Sync for ContainingBlock
impl Unpin for ContainingBlock
impl UnsafeUnpin for ContainingBlock
impl UnwindSafe for ContainingBlock
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> Filterable for T
impl<T> Filterable for T
Source§fn filterable(
self,
filter_name: &'static str,
) -> RequestFilterDataProvider<T, fn(DataRequest<'_>) -> bool>
fn filterable( self, filter_name: &'static str, ) -> RequestFilterDataProvider<T, fn(DataRequest<'_>) -> bool>
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