mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Implement calc expressions for more value types
This commit is contained in:
parent
35b452660b
commit
00980ea595
9 changed files with 383 additions and 312 deletions
|
@ -340,6 +340,10 @@ impl CandidateBSizeIterator {
|
|||
(LengthOrPercentageOrNone::Percentage(percent), Some(block_container_block_size)) => {
|
||||
Some(block_container_block_size.scale_by(percent))
|
||||
}
|
||||
(LengthOrPercentageOrNone::Calc(calc), Some(block_container_block_size)) => {
|
||||
Some(block_container_block_size.scale_by(calc.percentage()) + calc.length())
|
||||
}
|
||||
(LengthOrPercentageOrNone::Calc(_), _) |
|
||||
(LengthOrPercentageOrNone::Percentage(_), None) |
|
||||
(LengthOrPercentageOrNone::None, _) => None,
|
||||
(LengthOrPercentageOrNone::Length(length), _) => Some(length),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue