aboutsummaryrefslogtreecommitdiffstats
path: root/components
diff options
context:
space:
mode:
Diffstat (limited to 'components')
-rw-r--r--components/layout_2020/flow/mod.rs10
1 files changed, 9 insertions, 1 deletions
diff --git a/components/layout_2020/flow/mod.rs b/components/layout_2020/flow/mod.rs
index 1813e58daad..f46f2724f3d 100644
--- a/components/layout_2020/flow/mod.rs
+++ b/components/layout_2020/flow/mod.rs
@@ -141,13 +141,21 @@ impl BlockContainer {
writing_mode: WritingMode,
) -> ContentSizes {
match &self {
- Self::BlockLevelBoxes(boxes) => boxes
+ Self::BlockLevelBoxes(boxes) if layout_context.use_rayon => boxes
.par_iter()
.map(|box_| {
box_.borrow_mut()
.inline_content_sizes(layout_context, writing_mode)
})
.reduce(ContentSizes::zero, ContentSizes::max),
+ Self::BlockLevelBoxes(boxes) => boxes
+ .iter()
+ .map(|box_| {
+ box_.borrow_mut()
+ .inline_content_sizes(layout_context, writing_mode)
+ })
+ .reduce(ContentSizes::max)
+ .unwrap_or_else(ContentSizes::zero),
Self::InlineFormattingContext(context) => {
context.inline_content_sizes(layout_context, writing_mode)
},