aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout_2020/construct_modern.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/layout_2020/construct_modern.rs')
-rw-r--r--components/layout_2020/construct_modern.rs17
1 files changed, 7 insertions, 10 deletions
diff --git a/components/layout_2020/construct_modern.rs b/components/layout_2020/construct_modern.rs
index 5ff9aa08216..713954a39c8 100644
--- a/components/layout_2020/construct_modern.rs
+++ b/components/layout_2020/construct_modern.rs
@@ -15,9 +15,10 @@ use crate::dom_traversal::{Contents, NodeAndStyleInfo, TraversalHandler};
use crate::flow::inline::construct::InlineFormattingContextBuilder;
use crate::flow::{BlockContainer, BlockFormattingContext};
use crate::formatting_contexts::{
- IndependentFormattingContext, NonReplacedFormattingContext,
- NonReplacedFormattingContextContents,
+ IndependentFormattingContext, IndependentFormattingContextContents,
+ IndependentNonReplacedContents,
};
+use crate::layout_box_base::LayoutBoxBase;
use crate::style_ext::DisplayGeneratingBox;
/// <https://drafts.csswg.org/css-flexbox/#flex-items>
@@ -173,16 +174,12 @@ where
BlockContainer::InlineFormattingContext(inline_formatting_context),
);
let info = &self.info.new_anonymous(anonymous_style.clone().unwrap());
- let non_replaced = NonReplacedFormattingContext {
- base_fragment_info: info.into(),
- style: info.style.clone(),
- content_sizes_result: Default::default(),
- contents: NonReplacedFormattingContextContents::Flow(
- block_formatting_context,
+ let formatting_context = IndependentFormattingContext {
+ base: LayoutBoxBase::new(info.into(), info.style.clone()),
+ contents: IndependentFormattingContextContents::NonReplaced(
+ IndependentNonReplacedContents::Flow(block_formatting_context),
),
};
- let formatting_context =
- IndependentFormattingContext::NonReplaced(non_replaced);
Some(ModernItem {
kind: ModernItemKind::InFlow,