Struct layout_2020::display_list::stacking_context::ContainingBlock
source · pub(crate) struct ContainingBlock {
scroll_node_id: ScrollTreeNodeId,
scroll_frame_size: Option<LayoutSize>,
clip_chain_id: ClipChainId,
rect: PhysicalRect<Au>,
}
Fields§
§scroll_node_id: ScrollTreeNodeId
The 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_chain_id: ClipChainId
The WebRender ClipId to use for this children of this containing block.
rect: PhysicalRect<Au>
The physical rect of this containing block.
Implementations§
source§impl ContainingBlock
impl ContainingBlock
pub(crate) fn new( rect: PhysicalRect<Au>, scroll_node_id: ScrollTreeNodeId, scroll_frame_size: Option<LayoutSize>, clip_chain_id: ClipChainId, ) -> 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
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
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 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
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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>
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 moresource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert