Struct layout_2020::replaced::ReplacedContent
source · pub(crate) struct ReplacedContent {
pub kind: ReplacedContentKind,
natural_size: NaturalSizes,
base_fragment_info: BaseFragmentInfo,
}
Fields§
§kind: ReplacedContentKind
§natural_size: NaturalSizes
§base_fragment_info: BaseFragmentInfo
Implementations§
source§impl ReplacedContent
impl ReplacedContent
pub fn for_element<'dom>( element: impl NodeExt<'dom>, context: &LayoutContext<'_>, ) -> Option<Self>
pub fn from_image_url<'dom>( element: impl NodeExt<'dom>, context: &LayoutContext<'_>, image_url: &ComputedUrl, ) -> Option<Self>
pub fn from_image<'dom>( element: impl NodeExt<'dom>, context: &LayoutContext<'_>, image: &ComputedImage, ) -> Option<Self>
fn flow_relative_intrinsic_size( &self, style: &ComputedValues, ) -> LogicalVec2<Option<Au>>
fn inline_size_over_block_size_intrinsic_ratio( &self, style: &ComputedValues, ) -> Option<CSSFloat>
pub fn inline_content_sizes( &self, _: &LayoutContext<'_>, containing_block_for_children: &IndefiniteContainingBlock<'_>, preferred_aspect_ratio: Option<AspectRatio>, ) -> ContentSizes
pub fn make_fragments( &self, style: &ServoArc<ComputedValues>, containing_block: &ContainingBlock<'_>, size: PhysicalSize<Au>, ) -> Vec<Fragment>
pub(crate) fn preferred_aspect_ratio( &self, containing_block: &IndefiniteContainingBlock<'_>, style: &ComputedValues, ) -> Option<AspectRatio>
sourcepub(crate) fn used_size_as_if_inline_element(
&self,
containing_block: &ContainingBlock<'_>,
style: &ComputedValues,
pbm: &PaddingBorderMargin,
) -> LogicalVec2<Au>
pub(crate) fn used_size_as_if_inline_element( &self, containing_block: &ContainingBlock<'_>, style: &ComputedValues, pbm: &PaddingBorderMargin, ) -> LogicalVec2<Au>
sourcepub(crate) fn used_size_as_if_inline_element_from_content_box_sizes(
&self,
containing_block: &ContainingBlock<'_>,
style: &ComputedValues,
box_size: LogicalVec2<AuOrAuto>,
min_box_size: LogicalVec2<Au>,
max_box_size: LogicalVec2<Option<Au>>,
) -> LogicalVec2<Au>
pub(crate) fn used_size_as_if_inline_element_from_content_box_sizes( &self, containing_block: &ContainingBlock<'_>, style: &ComputedValues, box_size: LogicalVec2<AuOrAuto>, min_box_size: LogicalVec2<Au>, max_box_size: LogicalVec2<Option<Au>>, ) -> LogicalVec2<Au>
Trait Implementations§
source§impl Debug for ReplacedContent
impl Debug for ReplacedContent
Auto Trait Implementations§
impl Freeze for ReplacedContent
impl RefUnwindSafe for ReplacedContent
impl Send for ReplacedContent
impl Sync for ReplacedContent
impl Unpin for ReplacedContent
impl UnwindSafe for ReplacedContent
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> 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