diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2019-11-27 06:02:23 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-27 06:02:23 -0500 |
commit | 83bb96740dfff3bbb89bb7ba3160d37de039e0a1 (patch) | |
tree | 888f4213e8a78bc38cc8c7337c842c9d4dd99cd4 /components/layout_2020/flow/construct.rs | |
parent | 81c59077fded1a9402b25cff7006794057b92404 (diff) | |
parent | 9a4bc23ff0ca2b3bc6781e2d294caf1f492d6da1 (diff) | |
download | servo-83bb96740dfff3bbb89bb7ba3160d37de039e0a1.tar.gz servo-83bb96740dfff3bbb89bb7ba3160d37de039e0a1.zip |
Auto merge of #24871 - servo:2020-ci, r=nox,SimonSapin
Run WPT with Layout 2020 on CI
… and gate PRs on the result.
Diffstat (limited to 'components/layout_2020/flow/construct.rs')
-rw-r--r-- | components/layout_2020/flow/construct.rs | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/components/layout_2020/flow/construct.rs b/components/layout_2020/flow/construct.rs index f3afabf15fc..57d7bf9dd31 100644 --- a/components/layout_2020/flow/construct.rs +++ b/components/layout_2020/flow/construct.rs @@ -7,9 +7,9 @@ use crate::element_data::LayoutBox; use crate::flow::float::FloatBox; use crate::flow::inline::{InlineBox, InlineFormattingContext, InlineLevelBox, TextRun}; use crate::flow::{BlockContainer, BlockFormattingContext, BlockLevelBox}; +use crate::formatting_contexts::IndependentFormattingContext; use crate::positioned::AbsolutelyPositionedBox; use crate::style_ext::{DisplayGeneratingBox, DisplayInside, DisplayOutside}; -use crate::{take, IndependentFormattingContext}; use rayon::iter::{IntoParallelIterator, ParallelIterator}; use rayon_croissant::ParallelIteratorExt; use servo_arc::Arc; @@ -380,7 +380,7 @@ where // The fragmented boxes before the block level element // are obviously not the last fragment. last_fragment: false, - children: take(&mut ongoing.children), + children: std::mem::take(&mut ongoing.children), }; ongoing.first_fragment = false; fragmented @@ -450,11 +450,10 @@ where AbsolutelyPositionedBox { contents: IndependentFormattingContext::construct( unimplemented!(), - &style, + style, display_inside, contents, ), - style, }, )); self.current_inline_level_boxes().push(box_.clone()); @@ -482,11 +481,10 @@ where let box_ = Arc::new(InlineLevelBox::OutOfFlowFloatBox(FloatBox { contents: IndependentFormattingContext::construct( self.context, - &style, + style, display_inside, contents, ), - style, })); self.current_inline_level_boxes().push(box_.clone()); box_slot.set(LayoutBox::InlineLevel(box_)) @@ -517,7 +515,7 @@ where let box_ = IntermediateBlockLevelBox::SameFormattingContextBlock { style: anonymous_style.clone(), - contents: IntermediateBlockContainer::InlineFormattingContext(take( + contents: IntermediateBlockContainer::InlineFormattingContext(std::mem::take( &mut self.ongoing_inline_formatting_context, )), }; @@ -562,12 +560,12 @@ where } => { let contents = IndependentFormattingContext::construct( context, - &style, + style, display_inside, contents, ); ( - Arc::new(BlockLevelBox::Independent { style, contents }), + Arc::new(BlockLevelBox::Independent(contents)), ContainsFloats::No, ) }, @@ -580,11 +578,10 @@ where AbsolutelyPositionedBox { contents: IndependentFormattingContext::construct( context, - &style, + style, display_inside, contents, ), - style: style, }, )); (block_level_box, ContainsFloats::No) @@ -596,14 +593,12 @@ where } => { let contents = IndependentFormattingContext::construct( context, - &style, + style, display_inside, contents, ); - let block_level_box = Arc::new(BlockLevelBox::OutOfFlowFloatBox(FloatBox { - contents, - style, - })); + let block_level_box = + Arc::new(BlockLevelBox::OutOfFlowFloatBox(FloatBox { contents })); (block_level_box, ContainsFloats::Yes) }, } |