mirror of
https://github.com/servo/servo.git
synced 2025-06-25 01:24:37 +01:00
Fix computing line height for generic boxes and images.
This commit is contained in:
parent
5038924a1a
commit
09a4ba8d75
1 changed files with 7 additions and 0 deletions
|
@ -786,6 +786,10 @@ impl InlineFlowData {
|
|||
let height = Au::from_px(size.get_or_default(Size2D(0, 0)).height);
|
||||
image_box.base.position.size.height = height;
|
||||
|
||||
if height > linebox_height {
|
||||
linebox_height = height;
|
||||
}
|
||||
|
||||
image_box.base.position.translate(&Point2D(Au(0), -height))
|
||||
}
|
||||
TextRenderBoxClass(text_box) => {
|
||||
|
@ -822,6 +826,9 @@ impl InlineFlowData {
|
|||
// and other replaced content.
|
||||
// FIXME(pcwalton): This seems clownshoes; can we remove?
|
||||
generic_box.position.size.height = Au::from_px(30);
|
||||
if generic_box.position.size.height > linebox_height {
|
||||
linebox_height = generic_box.position.size.height;
|
||||
}
|
||||
generic_box.position
|
||||
}
|
||||
// FIXME(pcwalton): This isn't very type safe!
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue