servo: Merge #7496 - Implement CSS3 Calc (from servo:calc_); r=SimonSapin
This is #7185 with one commit added to make it build merged with master, which got support for the `ch` unit in the meantime. Source-Repo: https://github.com/servo/servo Source-Revision: a547ae6826cf171c42b090408a4c20d58d1829d9
This commit is contained in:
@@ -988,6 +988,11 @@ 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)
|
||||
|
||||
Reference in New Issue
Block a user