Skip to content

Commit 09a4ba8

Browse files
committed
Fix computing line height for generic boxes and images.
1 parent 5038924 commit 09a4ba8

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/components/main/layout/inline.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -786,6 +786,10 @@ impl InlineFlowData {
786786
let height = Au::from_px(size.get_or_default(Size2D(0, 0)).height);
787787
image_box.base.position.size.height = height;
788788
789+
if height > linebox_height {
790+
linebox_height = height;
791+
}
792+
789793
image_box.base.position.translate(&Point2D(Au(0), -height))
790794
}
791795
TextRenderBoxClass(text_box) => {
@@ -822,6 +826,9 @@ impl InlineFlowData {
822826
// and other replaced content.
823827
// FIXME(pcwalton): This seems clownshoes; can we remove?
824828
generic_box.position.size.height = Au::from_px(30);
829+
if generic_box.position.size.height > linebox_height {
830+
linebox_height = generic_box.position.size.height;
831+
}
825832
generic_box.position
826833
}
827834
// FIXME(pcwalton): This isn't very type safe!

0 commit comments

Comments
 (0)