diff options
author | Pu Xingyu <pu.stshine@gmail.com> | 2023-05-31 19:32:02 +0800 |
---|---|---|
committer | Pu Xingyu <pu.stshine@gmail.com> | 2023-05-31 23:28:28 +0800 |
commit | 5c71219819e57fe2ac5d634d8ab0d2104036c402 (patch) | |
tree | 79816ac1ff180a166f5a8710303507e123405149 /components/layout_2020/flow/construct.rs | |
parent | b8a037fc1f94d45fa426ec852ebe55b17ee78668 (diff) | |
download | servo-5c71219819e57fe2ac5d634d8ab0d2104036c402.tar.gz servo-5c71219819e57fe2ac5d634d8ab0d2104036c402.zip |
layout_2020: Check blocks for whether they will establish a formatting context
Diffstat (limited to 'components/layout_2020/flow/construct.rs')
-rw-r--r-- | components/layout_2020/flow/construct.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/components/layout_2020/flow/construct.rs b/components/layout_2020/flow/construct.rs index c45965df6e6..2989df6c7e5 100644 --- a/components/layout_2020/flow/construct.rs +++ b/components/layout_2020/flow/construct.rs @@ -11,7 +11,7 @@ use crate::flow::inline::{InlineBox, InlineFormattingContext, InlineLevelBox, Te use crate::flow::{BlockContainer, BlockFormattingContext, BlockLevelBox}; use crate::formatting_contexts::IndependentFormattingContext; use crate::positioned::AbsolutelyPositionedBox; -use crate::style_ext::{DisplayGeneratingBox, DisplayInside, DisplayOutside}; +use crate::style_ext::{ComputedValuesExt, DisplayGeneratingBox, DisplayInside, DisplayOutside}; use rayon::iter::{IntoParallelIterator, ParallelIterator}; use rayon_croissant::ParallelIteratorExt; use servo_arc::Arc; @@ -591,7 +591,9 @@ where let kind = match contents.try_into() { Ok(contents) => match display_inside { - DisplayInside::Flow { is_list_item } => { + DisplayInside::Flow { is_list_item } + if !info.style.establishes_block_formatting_context() => + { BlockLevelCreator::SameFormattingContextBlock( IntermediateBlockContainer::Deferred { contents, |