mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
layout: Assert that GRIDMIN <= GRIDMAX (#34892)
In the past this didn't hold, so we had to floor GRIDMAX by GRIDMIN. We must have fixed some bugs because now it's fine to just assert it. Signed-off-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
parent
4bdd246a6b
commit
d24b3e2035
1 changed files with 5 additions and 5 deletions
|
@ -753,11 +753,11 @@ impl<'a> TableLayout<'a> {
|
|||
.fold(ContentSizes::zero(), |result, measure| {
|
||||
result + measure.content_sizes
|
||||
});
|
||||
|
||||
// TODO: GRIDMAX should never be smaller than GRIDMIN!
|
||||
grid_min_max
|
||||
.max_content
|
||||
.max_assign(grid_min_max.min_content);
|
||||
assert!(
|
||||
grid_min_max.min_content <= grid_min_max.max_content,
|
||||
"GRIDMAX should never be smaller than GRIDMIN {:?}",
|
||||
grid_min_max
|
||||
);
|
||||
|
||||
let inline_border_spacing = self.table.total_border_spacing().inline;
|
||||
grid_min_max.min_content += inline_border_spacing;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue