Align table cell measures in the block axis to Gecko/Blink/WebKit (#31596)

This commit is contained in:
Oriol Brufau 2024-03-09 13:59:57 +01:00 committed by GitHub
parent 1f23ec2b27
commit fddc7a1390
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 22 deletions

View file

@ -199,27 +199,13 @@ impl<'a> TableLayout<'a> {
percentage: percentage_contribution.inline, percentage: percentage_contribution.inline,
}; };
// These calculations do not take into account the `min-content` and `max-content` // This measure doesn't take into account the `min-content` and `max-content` sizes.
// sizes. These sizes are incorporated after the first row layout pass, when the // These sizes are incorporated after the first row layout pass, when the block size
// block size of the layout is known. // of the layout is known.
//
// TODO: Is it correct to use the block size as the minimum of the `outer min
// content height` here? The specification doesn't mention this, but it does cause
// a test to pass.
let outer_min_content_height = min_size.block.max(size.block);
let outer_max_content_height = if !self.rows[row_index].constrained {
min_size.block.max(size.block)
} else {
min_size
.block
.max(size.block)
.max(max_size.block.min(size.block))
};
let block_measure = CellOrTrackMeasure { let block_measure = CellOrTrackMeasure {
content_sizes: ContentSizes { content_sizes: ContentSizes {
min_content: outer_min_content_height, min_content: size.block,
max_content: outer_max_content_height, max_content: size.block,
}, },
percentage: percentage_contribution.block, percentage: percentage_contribution.block,
}; };

View file

@ -1,3 +0,0 @@
[logicalprops-block-size.html]
[.tablecell 6]
expected: FAIL