mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Align table cell measures in the block axis to Gecko/Blink/WebKit (#31596)
This commit is contained in:
parent
1f23ec2b27
commit
fddc7a1390
2 changed files with 5 additions and 22 deletions
|
@ -199,27 +199,13 @@ impl<'a> TableLayout<'a> {
|
|||
percentage: percentage_contribution.inline,
|
||||
};
|
||||
|
||||
// These calculations do not take into account the `min-content` and `max-content`
|
||||
// sizes. These sizes are incorporated after the first row layout pass, when the
|
||||
// block size 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))
|
||||
};
|
||||
|
||||
// This measure doesn't take into account the `min-content` and `max-content` sizes.
|
||||
// These sizes are incorporated after the first row layout pass, when the block size
|
||||
// of the layout is known.
|
||||
let block_measure = CellOrTrackMeasure {
|
||||
content_sizes: ContentSizes {
|
||||
min_content: outer_min_content_height,
|
||||
max_content: outer_max_content_height,
|
||||
min_content: size.block,
|
||||
max_content: size.block,
|
||||
},
|
||||
percentage: percentage_contribution.block,
|
||||
};
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
[logicalprops-block-size.html]
|
||||
[.tablecell 6]
|
||||
expected: FAIL
|
Loading…
Add table
Add a link
Reference in a new issue