mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
layout: When searching for the baseline offset of the last in-flow line
and an inline flow has no applicable lines, continue checking previous sibling flows. Improves Twitter by placing the favorite icon in the right place.
This commit is contained in:
parent
22ba0e16e0
commit
3a56cc7f2f
1 changed files with 3 additions and 1 deletions
|
@ -1402,7 +1402,9 @@ impl<'a> ImmutableFlowUtils for &'a Flow {
|
|||
fn baseline_offset_of_last_line_box_in_flow(self) -> Option<Au> {
|
||||
for kid in base(self).children.iter().rev() {
|
||||
if kid.is_inline_flow() {
|
||||
return kid.as_inline().baseline_offset_of_last_line()
|
||||
if let Some(baseline_offset) = kid.as_inline().baseline_offset_of_last_line() {
|
||||
return Some(baseline_offset)
|
||||
}
|
||||
}
|
||||
if kid.is_block_like() &&
|
||||
kid.as_block().formatting_context_type() == FormattingContextType::None &&
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue