Struct layout_2013::display_list::items::StackingContext
source · pub struct StackingContext {Show 13 fields
pub id: StackingContextId,
pub context_type: StackingContextType,
pub bounds: LayoutRect,
pub overflow: LayoutRect,
pub z_index: i32,
pub in_top_layer: T,
pub filters: Vec<FilterOp>,
pub mix_blend_mode: MixBlendMode,
pub transform: Option<LayoutTransform>,
pub transform_style: TransformStyle,
pub perspective: Option<LayoutTransform>,
pub parent_clipping_and_scrolling: ClippingAndScrolling,
pub established_reference_frame: Option<ClipScrollNodeIndex>,
}
Expand description
Represents one CSS stacking context, which may or may not have a hardware layer.
Fields§
§id: StackingContextId
The ID of this StackingContext for uniquely identifying it.
context_type: StackingContextType
The type of this StackingContext. Used for collecting and sorting.
bounds: LayoutRect
The position and size of this stacking context.
overflow: LayoutRect
The overflow rect for this stacking context in its coordinate system.
z_index: i32
The z-index
for this stacking context.
in_top_layer: T
Whether this is the top layer.
filters: Vec<FilterOp>
CSS filters to be applied to this stacking context (including opacity).
mix_blend_mode: MixBlendMode
The blend mode with which this stacking context blends with its backdrop.
transform: Option<LayoutTransform>
A transform to be applied to this stacking context.
transform_style: TransformStyle
The transform style of this stacking context.
perspective: Option<LayoutTransform>
The perspective matrix to be applied to children.
parent_clipping_and_scrolling: ClippingAndScrolling
The clip and scroll info for this StackingContext.
established_reference_frame: Option<ClipScrollNodeIndex>
The index of the reference frame that this stacking context establishes.
Implementations§
source§impl StackingContext
impl StackingContext
sourcepub fn new(
id: StackingContextId,
context_type: StackingContextType,
bounds: LayoutRect,
overflow: LayoutRect,
z_index: i32,
in_top_layer: InTopLayer,
filters: Vec<FilterOp>,
mix_blend_mode: MixBlendMode,
transform: Option<LayoutTransform>,
transform_style: TransformStyle,
perspective: Option<LayoutTransform>,
parent_clipping_and_scrolling: ClippingAndScrolling,
established_reference_frame: Option<ClipScrollNodeIndex>,
) -> StackingContext
pub fn new( id: StackingContextId, context_type: StackingContextType, bounds: LayoutRect, overflow: LayoutRect, z_index: i32, in_top_layer: InTopLayer, filters: Vec<FilterOp>, mix_blend_mode: MixBlendMode, transform: Option<LayoutTransform>, transform_style: TransformStyle, perspective: Option<LayoutTransform>, parent_clipping_and_scrolling: ClippingAndScrolling, established_reference_frame: Option<ClipScrollNodeIndex>, ) -> StackingContext
Creates a new stacking context.
pub fn root() -> StackingContext
pub fn to_display_list_items(self) -> (DisplayItem, DisplayItem)
Trait Implementations§
source§impl Clone for StackingContext
impl Clone for StackingContext
source§fn clone(&self) -> StackingContext
fn clone(&self) -> StackingContext
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for StackingContext
impl Debug for StackingContext
source§impl Ord for StackingContext
impl Ord for StackingContext
source§impl PartialEq for StackingContext
impl PartialEq for StackingContext
source§impl PartialOrd for StackingContext
impl PartialOrd for StackingContext
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for StackingContext
impl Serialize for StackingContext
impl Eq for StackingContext
Auto Trait Implementations§
impl Freeze for StackingContext
impl RefUnwindSafe for StackingContext
impl Send for StackingContext
impl Sync for StackingContext
impl Unpin for StackingContext
impl UnwindSafe for StackingContext
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.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