mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Auto merge of #13329 - pcwalton:last-line-in-flow, r=notriddle
layout: Make `baseline_offset_of_last_line_box_in_flow()` only check blocks in flow. Improves python.org. Closes #12124. r? @notriddle <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13329) <!-- Reviewable:end -->
This commit is contained in:
commit
53938c439f
4 changed files with 95 additions and 1 deletions
|
@ -1405,7 +1405,8 @@ impl<'a> ImmutableFlowUtils for &'a Flow {
|
|||
return kid.as_inline().baseline_offset_of_last_line()
|
||||
}
|
||||
if kid.is_block_like() &&
|
||||
kid.as_block().formatting_context_type() == FormattingContextType::None {
|
||||
kid.as_block().formatting_context_type() == FormattingContextType::None &&
|
||||
!base(kid).flags.contains(IS_ABSOLUTELY_POSITIONED) {
|
||||
if let Some(baseline_offset) = kid.baseline_offset_of_last_line_box_in_flow() {
|
||||
return Some(base(kid).position.start.b + baseline_offset)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue