mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
layout: IFCs should not always be marked as containing floats (#31641)
Marking all IFCs as containing floats shouldn't change layout results, but does prevent parallel layout in some cases. This change fixes an issue where we were marking all IFCs as containing floats. Fixes #31540.
This commit is contained in:
parent
eaa800c8dd
commit
871a9bf677
2 changed files with 4 additions and 2 deletions
|
@ -971,7 +971,9 @@ impl<'a, 'b> InlineFormattingContextState<'a, 'b> {
|
|||
match text_align {
|
||||
TextAlign::Start => text_indent,
|
||||
TextAlign::End => (available_space - line_length).max(text_indent),
|
||||
TextAlign::Center => (available_space - line_length + text_indent) / 2.,
|
||||
TextAlign::Center => {
|
||||
((available_space - line_length + text_indent) / 2.).max(text_indent)
|
||||
},
|
||||
};
|
||||
|
||||
// Calculate the justification adjustment. This is simply the remaining space on the line,
|
||||
|
|
|
@ -64,7 +64,7 @@ impl BlockContainer {
|
|||
BlockContainer::BlockLevelBoxes(boxes) => boxes
|
||||
.iter()
|
||||
.any(|block_level_box| block_level_box.borrow().contains_floats()),
|
||||
BlockContainer::InlineFormattingContext { .. } => true,
|
||||
BlockContainer::InlineFormattingContext(context) => context.contains_floats,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue