pub(crate) struct BaseFragment {
pub tag: Option<Tag>,
pub flags: FragmentFlags,
rect: SyncPhysicalRectAu,
pub status: AtomicU8,
}Expand description
This data structure stores fields that are common to all non-base Fragment types and should generally be the first member of all concrete fragments.
Fields§
§tag: Option<Tag>A tag which identifies the DOM node and pseudo element of this Fragment’s content. If this fragment is for an anonymous box, the tag will be None.
flags: FragmentFlagsFlags which various information about this fragment used during layout.
rect: SyncPhysicalRectAuThe content rect of this fragment in the parent fragment’s content rectangle. This does not include padding, border, or margin – it only includes content. This is relative to the parent containing block.
status: AtomicU8A FragmentStatus used to track fragment reuse when collecting reflow statistics.
Implementations§
Source§impl BaseFragment
impl BaseFragment
fn visit_fragment(&self, builder: &mut DisplayListBuilder<'_>)
Source§impl BaseFragment
impl BaseFragment
pub(crate) fn new( base_fragment_info: BaseFragmentInfo, rect: PhysicalRect<Au>, ) -> Self
pub(crate) fn rect(&self) -> PhysicalRect<Au>
pub(crate) fn set_rect(&self, new_rect: PhysicalRect<Au>)
pub(crate) fn translate_rect(&self, offset: PhysicalSize<Au>)
pub(crate) fn set_rect_origin(&self, offset: PhysicalPoint<Au>)
pub(crate) fn is_anonymous(&self) -> bool
pub(crate) fn status(&self) -> FragmentStatus
pub(crate) fn set_status(&self, new_status: FragmentStatus)
Trait Implementations§
Source§impl Debug for BaseFragment
impl Debug for BaseFragment
Source§impl MallocSizeOf for BaseFragment
impl MallocSizeOf for BaseFragment
Source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself.
Auto Trait Implementations§
impl !Freeze for BaseFragment
impl RefUnwindSafe for BaseFragment
impl Send for BaseFragment
impl Sync for BaseFragment
impl Unpin for BaseFragment
impl UnsafeUnpin for BaseFragment
impl UnwindSafe for BaseFragment
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> 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>
Creates a filterable data provider with the given name for debugging. 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