mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Make InlineLevelBox::Atomic store an IndependentFormattingContext
This commit is contained in:
parent
ecfb82260c
commit
48a4a82a49
2 changed files with 13 additions and 13 deletions
|
@ -325,10 +325,14 @@ where
|
|||
contents: Contents<Node>,
|
||||
) -> Arc<InlineLevelBox> {
|
||||
let box_ = match contents.try_into() {
|
||||
Err(replaced) => Arc::new(InlineLevelBox::Atomic {
|
||||
style: style.clone(),
|
||||
contents: replaced,
|
||||
}),
|
||||
Err(replaced) => Arc::new(InlineLevelBox::Atomic(
|
||||
IndependentFormattingContext::construct(
|
||||
self.context,
|
||||
style.clone(),
|
||||
display_inside,
|
||||
<Contents<Node>>::Replaced(replaced),
|
||||
),
|
||||
)),
|
||||
Ok(non_replaced) => match display_inside {
|
||||
DisplayInside::Flow |
|
||||
// TODO: Properly implement display: inline-block.
|
||||
|
|
|
@ -5,12 +5,12 @@
|
|||
use crate::context::LayoutContext;
|
||||
use crate::flow::float::FloatBox;
|
||||
use crate::flow::FlowLayout;
|
||||
use crate::formatting_contexts::IndependentFormattingContext;
|
||||
use crate::fragments::{
|
||||
AnonymousFragment, BoxFragment, CollapsedBlockMargins, Fragment, TextFragment,
|
||||
};
|
||||
use crate::geom::flow_relative::{Rect, Sides, Vec2};
|
||||
use crate::positioned::{AbsolutelyPositionedBox, AbsolutelyPositionedFragment};
|
||||
use crate::replaced::ReplacedContent;
|
||||
use crate::style_ext::{ComputedValuesExt, Display, DisplayGeneratingBox, DisplayOutside};
|
||||
use crate::{relative_adjustement, ContainingBlock};
|
||||
use servo_arc::Arc;
|
||||
|
@ -29,11 +29,7 @@ pub(crate) enum InlineLevelBox {
|
|||
TextRun(TextRun),
|
||||
OutOfFlowAbsolutelyPositionedBox(AbsolutelyPositionedBox),
|
||||
OutOfFlowFloatBox(FloatBox),
|
||||
Atomic {
|
||||
style: Arc<ComputedValues>,
|
||||
// FIXME: this should be IndependentFormattingContext:
|
||||
contents: ReplacedContent,
|
||||
},
|
||||
Atomic(IndependentFormattingContext),
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
|
@ -112,9 +108,9 @@ impl InlineFormattingContext {
|
|||
ifc.partial_inline_boxes_stack.push(partial)
|
||||
},
|
||||
InlineLevelBox::TextRun(run) => run.layout(layout_context, &mut ifc),
|
||||
InlineLevelBox::Atomic { style: _, contents } => {
|
||||
// FIXME
|
||||
match *contents {}
|
||||
InlineLevelBox::Atomic(_independent) => {
|
||||
// TODO
|
||||
continue;
|
||||
},
|
||||
InlineLevelBox::OutOfFlowAbsolutelyPositionedBox(box_) => {
|
||||
let initial_start_corner =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue