pub(crate) struct BaseFragment {
pub tag: Option<Tag>,
pub flags: FragmentFlags,
pub style: BaseFragmentStyle,
pub rect: PhysicalRect<Au>,
pub status: FragmentStatus,
}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.
style: BaseFragmentStyleThe style for this BaseFragment. Depending on the fragment type this is either
a shared or non-shared style.
rect: PhysicalRect<Au>The 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: FragmentStatusA FragmentStatus used to track fragment reuse when collecting reflow statistics.
Implementations§
Source§impl BaseFragment
impl BaseFragment
pub(crate) fn new( base_fragment_info: BaseFragmentInfo, style: BaseFragmentStyle, rect: PhysicalRect<Au>, ) -> Self
pub(crate) fn is_anonymous(&self) -> bool
pub(crate) fn repair_style(&mut self, style: &ServoArc<ComputedValues>)
pub(crate) fn style<'a>(&'a self) -> BaseFragmentStyleRef<'a>
Trait Implementations§
Source§impl Clone for BaseFragment
impl Clone for BaseFragment
Source§fn clone(&self) -> BaseFragment
fn clone(&self) -> BaseFragment
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§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
Auto Trait Implementations§
impl Freeze for BaseFragment
impl !RefUnwindSafe for BaseFragment
impl Send for BaseFragment
impl Sync for BaseFragment
impl Unpin 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
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