mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Make some of layout_2020 private
This commit is contained in:
parent
ec74204fa0
commit
1bb85ed05b
10 changed files with 43 additions and 41 deletions
|
@ -123,7 +123,7 @@ struct BlockContainerBuilder<'dom, 'style, Node> {
|
|||
}
|
||||
|
||||
impl BlockContainer {
|
||||
pub(crate) fn construct<'dom, 'style>(
|
||||
pub fn construct<'dom, 'style>(
|
||||
context: &SharedStyleContext<'style>,
|
||||
block_container_style: &Arc<ComputedValues>,
|
||||
contents: NonReplacedContents<impl NodeExt<'dom>>,
|
||||
|
@ -646,7 +646,7 @@ where
|
|||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
|
||||
pub enum ContainsFloats {
|
||||
pub(crate) enum ContainsFloats {
|
||||
No,
|
||||
Yes,
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ use servo_arc::Arc;
|
|||
use style::properties::ComputedValues;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct FloatBox {
|
||||
pub(crate) struct FloatBox {
|
||||
pub style: Arc<ComputedValues>,
|
||||
pub contents: IndependentFormattingContext,
|
||||
}
|
||||
|
|
|
@ -16,12 +16,12 @@ use style::values::computed::Length;
|
|||
use style::Zero;
|
||||
|
||||
#[derive(Debug, Default)]
|
||||
pub struct InlineFormattingContext {
|
||||
pub(crate) struct InlineFormattingContext {
|
||||
pub(super) inline_level_boxes: Vec<Arc<InlineLevelBox>>,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum InlineLevelBox {
|
||||
pub(crate) enum InlineLevelBox {
|
||||
InlineBox(InlineBox),
|
||||
TextRun(TextRun),
|
||||
OutOfFlowAbsolutelyPositionedBox(AbsolutelyPositionedBox),
|
||||
|
@ -34,7 +34,7 @@ pub enum InlineLevelBox {
|
|||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct InlineBox {
|
||||
pub(crate) struct InlineBox {
|
||||
pub style: Arc<ComputedValues>,
|
||||
pub first_fragment: bool,
|
||||
pub last_fragment: bool,
|
||||
|
@ -43,7 +43,7 @@ pub struct InlineBox {
|
|||
|
||||
/// https://www.w3.org/TR/css-display-3/#css-text-run
|
||||
#[derive(Debug)]
|
||||
pub struct TextRun {
|
||||
pub(crate) struct TextRun {
|
||||
pub parent_style: Arc<ComputedValues>,
|
||||
pub text: String,
|
||||
}
|
||||
|
|
|
@ -25,22 +25,24 @@ use style::Zero;
|
|||
mod construct;
|
||||
mod float;
|
||||
pub mod inline;
|
||||
pub mod root;
|
||||
mod root;
|
||||
|
||||
pub use root::BoxTreeRoot;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct BlockFormattingContext {
|
||||
pub(crate) struct BlockFormattingContext {
|
||||
pub contents: BlockContainer,
|
||||
pub contains_floats: bool,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum BlockContainer {
|
||||
pub(crate) enum BlockContainer {
|
||||
BlockLevelBoxes(Vec<Arc<BlockLevelBox>>),
|
||||
InlineFormattingContext(InlineFormattingContext),
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum BlockLevelBox {
|
||||
pub(crate) enum BlockLevelBox {
|
||||
SameFormattingContextBlock {
|
||||
style: Arc<ComputedValues>,
|
||||
contents: BlockContainer,
|
||||
|
|
|
@ -22,7 +22,6 @@ use style::properties::ComputedValues;
|
|||
use style::values::computed::{Length, LengthOrAuto};
|
||||
use style_traits::CSSPixel;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct BoxTreeRoot(BlockFormattingContext);
|
||||
|
||||
impl BoxTreeRoot {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue