From 7bf06ed4592ed5dc579179b0d12afc832d4d51a0 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Fri, 7 Oct 2016 18:10:59 -0700 Subject: [PATCH] layout: Take the position of `InlineFlow`s in account when determining the baseline offset of the last line box in flow. This caused incorrect layouts in some cases. --- components/layout/flow.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/layout/flow.rs b/components/layout/flow.rs index f206e9fc5a8..5fdff19d8eb 100644 --- a/components/layout/flow.rs +++ b/components/layout/flow.rs @@ -1401,7 +1401,7 @@ impl<'a> ImmutableFlowUtils for &'a Flow { for kid in base(self).children.iter().rev() { if kid.is_inline_flow() { if let Some(baseline_offset) = kid.as_inline().baseline_offset_of_last_line() { - return Some(baseline_offset) + return Some(base(kid).position.start.b + baseline_offset) } } if kid.is_block_like() &&