pub struct BoxTree {
root: BlockFormattingContext,
pub(crate) viewport_overflow: AxesOverflow,
pub(crate) initial_containing_block_style: Arc<ComputedValues>,
}Fields§
§root: BlockFormattingContextContains typically exactly one block-level box, which was generated by the root element.
There may be zero if that element has display: none.
viewport_overflow: AxesOverflowWhether or not the viewport should be sensitive to scrolling input events in two axes
initial_containing_block_style: Arc<ComputedValues>The style to use for the initial containing block.
Implementations§
Source§impl BoxTree
impl BoxTree
pub(crate) fn construct( context: &LayoutContext<'_>, root_element: ServoLayoutNode<'_>, ) -> Self
Sourcepub(crate) fn writing_mode_source_style(
context: &SharedStyleContext<'_>,
root_element: ServoLayoutNode<'_>,
) -> ServoArc<ComputedValues>
pub(crate) fn writing_mode_source_style( context: &SharedStyleContext<'_>, root_element: ServoLayoutNode<'_>, ) -> ServoArc<ComputedValues>
From https://drafts.csswg.org/css-writing-modes/#principal-flow:
The principal writing mode of the document is determined by the used writing-mode, direction, and text-orientation values of the root element. This writing mode is used, for example, to determine the direction of scrolling and the default page progression direction.
As a special case for handling HTML documents, if the root element has a body child element [HTML] whose display value is not none, the used value of the of writing-mode and direction properties on root element are taken from the computed writing-mode and direction of the first such child element instead of from the root element’s own values. The UA may also propagate the value of text-orientation in this manner. Note that this does not affect the computed values of writing-mode, direction, or text-orientation of the root element itself.
pub(crate) fn style_with_writing_mode_source_style( base_style: ServoArc<ComputedValues>, writing_mode_source_style: &ServoArc<ComputedValues>, ) -> ServoArc<ComputedValues>
pub(crate) fn writing_mode(&self) -> WritingMode
fn viewport_overflow( root_element: ServoLayoutNode<'_>, root_box: Option<&ArcRefCell<BlockLevelBox>>, ) -> AxesOverflow
Source§impl BoxTree
impl BoxTree
pub(crate) fn layout( &self, layout_context: &LayoutContext<'_>, viewport: UntypedSize2D<Au>, ) -> FragmentTree
Trait Implementations§
Source§impl MallocSizeOf for BoxTree
impl MallocSizeOf for BoxTree
Source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Auto Trait Implementations§
impl !Freeze for BoxTree
impl !RefUnwindSafe for BoxTree
impl !UnwindSafe for BoxTree
impl Send for BoxTree
impl Sync for BoxTree
impl Unpin for BoxTree
impl UnsafeUnpin for BoxTree
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> ErasedDestructor for Twhere
T: 'static,
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