Parallelize BlockContainer::inline_content_sizes

This commit is contained in:
Simon Sapin 2020-06-19 15:38:15 +02:00
parent 5fed956d65
commit 42e9d2450e
2 changed files with 12 additions and 14 deletions

View file

@ -33,9 +33,11 @@ impl ContentSizes {
}
}
pub fn max_assign(&mut self, other: &Self) {
self.min_content.max_assign(other.min_content);
self.max_content.max_assign(other.max_content);
pub fn max(self, other: Self) -> Self {
Self {
min_content: self.min_content.max(other.min_content),
max_content: self.max_content.max(other.max_content),
}
}
/// Relevant to outer intrinsic inline sizes, for percentages from padding and margin.