mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Assert that we don't get malformed ContentSizes in tables (#33549)
We have improved the logic for computing intrinsic sizes, and apparently we are no longer getting a `ContentSizes` whose `min_content` is greater than the `max_content`. Signed-off-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
parent
7fdaccde55
commit
1346643727
1 changed files with 4 additions and 5 deletions
|
@ -297,11 +297,10 @@ impl<'a> TableLayout<'a> {
|
|||
};
|
||||
inline_content_sizes.min_content += padding_border_sums.inline;
|
||||
inline_content_sizes.max_content += padding_border_sums.inline;
|
||||
|
||||
// TODO: the max-content size should never be smaller than the min-content size!
|
||||
inline_content_sizes.max_content = inline_content_sizes
|
||||
.max_content
|
||||
.max(inline_content_sizes.min_content);
|
||||
assert!(
|
||||
inline_content_sizes.max_content >= inline_content_sizes.min_content,
|
||||
"the max-content size should never be smaller than the min-content size"
|
||||
);
|
||||
|
||||
// These formulas differ from the spec, but seem to match Gecko and Blink.
|
||||
let outer_min_content_width = if is_in_fixed_mode {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue