mirror of
https://github.com/servo/servo.git
synced 2025-08-11 16:35:33 +01:00
Implement Calc for LengthOrPercentage
This commit is contained in:
parent
fa5ad1c6b4
commit
9556141e57
6 changed files with 165 additions and 13 deletions
|
@ -988,7 +988,12 @@ impl InlineFlow {
|
|||
let percent_offset = line_height.scale_by(p);
|
||||
offset_from_baseline = offset_from_baseline - percent_offset
|
||||
}
|
||||
}
|
||||
vertical_align::T::Calc(calc) => {
|
||||
let line_height = fragment.calculate_line_height(layout_context);
|
||||
let percent_offset = line_height.scale_by(calc.percentage());
|
||||
offset_from_baseline = offset_from_baseline - percent_offset - calc.length()
|
||||
}
|
||||
}
|
||||
}
|
||||
(offset_from_baseline - ascent, largest_size_updated)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue